-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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: confusing documentation on build tags #53308
Comments
|
@seankhliao |
I'd say the "also known as a build tag" part is wrong. "darwin" and "cgo" are build tags, the whole |
This was added on purpose: https://codereview.appspot.com/44100043 |
Change https://go.dev/cl/411697 mentions this issue: |
To clarify, I would also suggest adding the term "additional" to the documentation of the
as already used in the build constraints documentation by referring to the |
@gazerro Thanks, I made that change in https://go.dev/cl/411697. |
@ianlancetaylor Thanks. I just noticed a typo in the same line, |
@gazerro Thanks, fixed. |
Clarify that the //go:build line is an expression of constraints, not a constraint itself. Fixes golang#53308 Change-Id: Ib67243c6ee5cfe3b688c12b943b5e7496f686035 Reviewed-on: https://go-review.googlesource.com/c/go/+/411697 Reviewed-by: Rob Pike <r@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com> Run-TryBot: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: David Chase <drchase@google.com>
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What did you do?
The go command documentation (https://pkg.go.dev/cmd/go@master) reports
So
tag
andlist
in the example are called "build tags". I open the description of build constraints in the go/build package documentation (https://pkg.go.dev/go/build#hdr-Build_Constraints) and it reports:So the tag option of the go command wants a list of line comments? And which "build tags" can be used with the go command?
What did you expect to see?
The values that can be used for the tag option of the go command.
What did you see instead?
Confusing documentation on build tags.
The text was updated successfully, but these errors were encountered: