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
prog.go:5: +build comment must appear before package clause and be followed by a blank line
This makes it a little difficult to include example code in the package doc, when the example needs to show a build directive.
Note that it's not just interpreting the +build ignore as a build directive inside the package comment. If we alter that line so that line alone doesn't look like a Go comment, vet reports no error: https://play.golang.org/p/v6DLrueUHqN
The text was updated successfully, but these errors were encountered:
@kr yea they look similar. I'm gonna close this, but please comment there if you feel the conversation/CLs in #26627 are not addressing your exact concerns.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What did you do?
https://play.golang.org/p/xABgz0L94ig
What did you expect to see?
No error message, as in https://play.golang.org/p/v6DLrueUHqN.
What did you see instead?
This makes it a little difficult to include example code in the package doc, when the example needs to show a build directive.
Note that it's not just interpreting the
+build ignore
as a build directive inside the package comment. If we alter that line so that line alone doesn't look like a Go comment, vet reports no error: https://play.golang.org/p/v6DLrueUHqNThe text was updated successfully, but these errors were encountered: