]> Cypherpunks repositories - gostls13.git/commitdiff
go/build: document when Context.BuildTags is used.
authorMuhammad Falak R Wani <falakreyaz@gmail.com>
Wed, 29 Aug 2018 00:01:46 +0000 (05:31 +0530)
committerIan Lance Taylor <iant@golang.org>
Wed, 12 Dec 2018 23:48:35 +0000 (23:48 +0000)
Context.BuildTags is not set when you read go/build.Default.BuildTags.
It's only used by (*BuildTags).Import, etc.

Fixes: #27320
Change-Id: I97e5f1923c410b48f70be8c15938a7e04a178e3f
Reviewed-on: https://go-review.googlesource.com/c/131975
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/go/build/build.go

index 5e683aef9822f82661c09625a6641a210b4111fc..0fa67201f88dc84e1a3230b563688ec5493cf598 100644 (file)
@@ -43,6 +43,7 @@ type Context struct {
        // Clients creating a new context may customize BuildTags, which
        // defaults to empty, but it is usually an error to customize ReleaseTags,
        // which defaults to the list of Go releases the current release is compatible with.
+       // BuildTags is not set for the Default build Context.
        // In addition to the BuildTags and ReleaseTags, build constraints
        // consider the values of GOARCH and GOOS as satisfied tags.
        // The last element in ReleaseTags is assumed to be the current release.