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
go/build: document when Context.BuildTags is used/populated #27320
Comments
Can I take a shot on this |
Change https://golang.org/cl/131975 mentions this issue: |
But why would you expect |
@ianlancetaylor, at Gophercon somebody wanted to get their program's build tags at runtime and their first guess was to look there. But we don't record the build tags in the binary. (Reportedly there's an existing bug where that feature request was declined, but I can't find it.) |
I see. The go/build package is about building other packages. It doesn't tell you anything about your own program. Even |
It kinda does, though, in that people use ReleaseTags to see which version of Go it was built with. |
Huh, you're right, it's a mix. |
Context.BuildTags is not set when you read go/build.Default.BuildTags.
It's only used by (*BuildTags).Import, etc.
Document that.
The text was updated successfully, but these errors were encountered: