Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 6e096e2

Browse files
jmhodgesgopherbot
authored andcommittedMar 29, 2023
cmd/go: change +build doc references to //go:build
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: e0eb9be GitHub-Pull-Request: #59245 Reviewed-on: https://go-review.googlesource.com/c/go/+/479417 Run-TryBot: Ian Lance Taylor <[email protected]> Reviewed-by: Matthew Dempsky <[email protected]> Auto-Submit: Ian Lance Taylor <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]>
1 parent 0d9eb8b commit 6e096e2

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed
 

‎src/cmd/go/alldocs.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/cmd/go/internal/list/context.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ type Context struct {
1414
GOROOT string `json:",omitempty"` // Go root
1515
GOPATH string `json:",omitempty"` // Go path
1616
CgoEnabled bool `json:",omitempty"` // whether cgo can be used
17-
UseAllFiles bool `json:",omitempty"` // use files regardless of +build lines, file names
17+
UseAllFiles bool `json:",omitempty"` // use files regardless of //go:build lines, file names
1818
Compiler string `json:",omitempty"` // compiler to assume when computing target paths
1919
BuildTags []string `json:",omitempty"` // build constraints to match in +build lines
2020
ToolTags []string `json:",omitempty"` // toolchain-specific build constraints

‎src/cmd/go/internal/list/list.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,9 @@ The template function "context" returns the build context, defined as:
148148
GOROOT string // Go root
149149
GOPATH string // Go path
150150
CgoEnabled bool // whether cgo can be used
151-
UseAllFiles bool // use files regardless of +build lines, file names
151+
UseAllFiles bool // use files regardless of //go:build lines, file names
152152
Compiler string // compiler to assume when computing target paths
153-
BuildTags []string // build constraints to match in +build lines
153+
BuildTags []string // build constraints to match in //go:build lines
154154
ToolTags []string // toolchain-specific build constraints
155155
ReleaseTags []string // releases the current release is compatible with
156156
InstallSuffix string // suffix to use in the name of the install dir

‎src/cmd/go/internal/modindex/build.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ type Context struct {
4242
Dir string
4343

4444
CgoEnabled bool // whether cgo files are included
45-
UseAllFiles bool // use files regardless of +build lines, file names
45+
UseAllFiles bool // use files regardless of //go:build lines, file names
4646
Compiler string // compiler to assume when computing target paths
4747

4848
// The build, tool, and release tags specify build constraints

0 commit comments

Comments
 (0)
Please sign in to comment.