You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
must appear near the top of the file, preceded only by blank lines and other line comments.
However, during experimentation it became apparent that //go:build directives are honored even after block
comments. This didn't seem to hold true for the older //+build form.
I reached out to gophers slack's #tools channel for their input, and they thought it'd be
worth filing an issue. dominikh created https://go.dev/play/p/5jqlmjNEjOH.go showing his
results, which match mine.
What did you expect to see?
That the compiler and documentation match. If the current docs are correct, the compiler would ignore build constraints if proceeded by things other than line comments, while if the current compiler is correct, that the docs describe what the compiler allows.
For example, the docs seem to imply that the constraint should be ignored: