Skip to content
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/vet: Incorrect warning for build tag in string. #9813

Closed
ryanslade opened this issue Feb 9, 2015 · 1 comment
Closed

cmd/vet: Incorrect warning for build tag in string. #9813

ryanslade opened this issue Feb 9, 2015 · 1 comment

Comments

@ryanslade
Copy link
Contributor

go vet does a simple scan of the code looking for lines starting with "// +build", it is possible for this to appear in valid code. For example:

package main

const template = '
// +build example

package thing

func main() {
}'

func main() {
    // Whatever
}
@rsc
Copy link
Contributor

rsc commented Apr 10, 2015

It's a warning. You can ignore it. Trying to split this hair is probably not worthwhile.

@rsc rsc closed this as completed Apr 10, 2015
@golang golang locked and limited conversation to collaborators Jun 25, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants