Skip to content

Commit

Permalink
cmd/go: change +build doc references to //go:build
Browse files Browse the repository at this point in the history
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: golang#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]>
  • Loading branch information
jmhodges authored and gopherbot committed Mar 29, 2023
1 parent 0d9eb8b commit 6e096e2
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/cmd/go/alldocs.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/cmd/go/internal/list/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/cmd/go/internal/list/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/go/internal/modindex/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6e096e2

Please sign in to comment.