-
Notifications
You must be signed in to change notification settings - Fork 17.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/go: build tags not working if preceeded with /* */ comments #43286
Comments
This is working as intended, go vet will highlight the error that the build tag must be the first line of the file and there must be a space between // and +build |
@davecheney then why does this work?
Also vet only says |
I don’t make the rules, I’m just telling you what they are. If vet is happy with this input then maybe that’s a bug. |
I'm sorry, my previous comment was not productive. I'm not sure why vet isn't flagging your incorrect build tag, but I'm guessing it is because the tag is both in the wrong place, it isn't the first line of the file, and there is no space between the |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
go run .
-- main.go --
-- main2.go --
What did you expect to see?
Output:
!foo
This works if instead of
/* */
comments I used//
comments in the same placesWhat did you see instead?
The text was updated successfully, but these errors were encountered: