]> Cypherpunks.ru repositories - gostls13.git/commitdiff
cmd/go: change +build doc references to //go:build
authorJeff Hodges <jeff@somethingsimilar.com>
Sat, 25 Mar 2023 23:21:01 +0000 (23:21 +0000)
committerGopher Robot <gobot@golang.org>
Wed, 29 Mar 2023 21:56:16 +0000 (21:56 +0000)
This changes a few references to `+build` into the modern `//go:build`.
It was compiled by editing `cmd/go/internal/list/context.go`, running
`go test cmd/go -v -run=TestDocsUpToDate -fixdocs`, and then editing
list.go and build.go by hand.

Change-Id: I00fec55e098bf5100f5a186dd975a6628e15beb8
GitHub-Last-Rev: e0eb9be77e9e409479ef48a65f750546d2a9ddcc
GitHub-Pull-Request: golang/go#59245
Reviewed-on: https://go-review.googlesource.com/c/go/+/479417
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
src/cmd/go/alldocs.go
src/cmd/go/internal/list/context.go
src/cmd/go/internal/list/list.go
src/cmd/go/internal/modindex/build.go

index d6701dcfffd631b81f398ffaee4857ddc080886c..99a4f75ab5ad0a927d106cbb0ec9b5671c26048d 100644 (file)
 //         GOROOT        string   // Go root
 //         GOPATH        string   // Go path
 //         CgoEnabled    bool     // whether cgo can be used
-//         UseAllFiles   bool     // use files regardless of +build lines, file names
+//         UseAllFiles   bool     // use files regardless of //go:build lines, file names
 //         Compiler      string   // compiler to assume when computing target paths
-//         BuildTags     []string // build constraints to match in +build lines
+//         BuildTags     []string // build constraints to match in //go:build lines
 //         ToolTags      []string // toolchain-specific build constraints
 //         ReleaseTags   []string // releases the current release is compatible with
 //         InstallSuffix string   // suffix to use in the name of the install dir
index 2dc63766b70654576156bebd007d6b35c0def832..9d6494cfba01699b2b60f95778e49e2238117253 100644 (file)
@@ -14,7 +14,7 @@ type Context struct {
        GOROOT        string   `json:",omitempty"` // Go root
        GOPATH        string   `json:",omitempty"` // Go path
        CgoEnabled    bool     `json:",omitempty"` // whether cgo can be used
-       UseAllFiles   bool     `json:",omitempty"` // use files regardless of +build lines, file names
+       UseAllFiles   bool     `json:",omitempty"` // use files regardless of //go:build lines, file names
        Compiler      string   `json:",omitempty"` // compiler to assume when computing target paths
        BuildTags     []string `json:",omitempty"` // build constraints to match in +build lines
        ToolTags      []string `json:",omitempty"` // toolchain-specific build constraints
index 6d6deda884635c2abae1d16b9a5c48b1e503849b..31c14c86c6a63ee7b6898b8ac23ae582d1ac1d21 100644 (file)
@@ -148,9 +148,9 @@ The template function "context" returns the build context, defined as:
         GOROOT        string   // Go root
         GOPATH        string   // Go path
         CgoEnabled    bool     // whether cgo can be used
-        UseAllFiles   bool     // use files regardless of +build lines, file names
+        UseAllFiles   bool     // use files regardless of //go:build lines, file names
         Compiler      string   // compiler to assume when computing target paths
-        BuildTags     []string // build constraints to match in +build lines
+        BuildTags     []string // build constraints to match in //go:build lines
         ToolTags      []string // toolchain-specific build constraints
         ReleaseTags   []string // releases the current release is compatible with
         InstallSuffix string   // suffix to use in the name of the install dir
index ae03d4a7798e14f5e180a1a29a1aa0abc4e84cad..b57f2f6368f0fedf3158a88999db83ca6b30ea12 100644 (file)
@@ -42,7 +42,7 @@ type Context struct {
        Dir string
 
        CgoEnabled  bool   // whether cgo files are included
-       UseAllFiles bool   // use files regardless of +build lines, file names
+       UseAllFiles bool   // use files regardless of //go:build lines, file names
        Compiler    string // compiler to assume when computing target paths
 
        // The build, tool, and release tags specify build constraints