1
0
mirror of https://github.com/golang/go synced 2024-11-17 03:14:50 -07:00

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.
This commit is contained in:
Jeff Hodges 2023-03-25 15:58:06 -07:00
parent 06264b740e
commit e0eb9be77e
4 changed files with 6 additions and 6 deletions

View File

@ -883,9 +883,9 @@
// GOROOT string // Go root // GOROOT string // Go root
// GOPATH string // Go path // GOPATH string // Go path
// CgoEnabled bool // whether cgo can be used // 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 // 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 // ToolTags []string // toolchain-specific build constraints
// ReleaseTags []string // releases the current release is compatible with // ReleaseTags []string // releases the current release is compatible with
// InstallSuffix string // suffix to use in the name of the install dir // InstallSuffix string // suffix to use in the name of the install dir

View File

@ -14,7 +14,7 @@ type Context struct {
GOROOT string `json:",omitempty"` // Go root GOROOT string `json:",omitempty"` // Go root
GOPATH string `json:",omitempty"` // Go path GOPATH string `json:",omitempty"` // Go path
CgoEnabled bool `json:",omitempty"` // whether cgo can be used 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 Compiler string `json:",omitempty"` // compiler to assume when computing target paths
BuildTags []string `json:",omitempty"` // build constraints to match in +build lines BuildTags []string `json:",omitempty"` // build constraints to match in +build lines
ToolTags []string `json:",omitempty"` // toolchain-specific build constraints ToolTags []string `json:",omitempty"` // toolchain-specific build constraints

View File

@ -148,9 +148,9 @@ The template function "context" returns the build context, defined as:
GOROOT string // Go root GOROOT string // Go root
GOPATH string // Go path GOPATH string // Go path
CgoEnabled bool // whether cgo can be used 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 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 ToolTags []string // toolchain-specific build constraints
ReleaseTags []string // releases the current release is compatible with ReleaseTags []string // releases the current release is compatible with
InstallSuffix string // suffix to use in the name of the install dir InstallSuffix string // suffix to use in the name of the install dir

View File

@ -42,7 +42,7 @@ type Context struct {
Dir string Dir string
CgoEnabled bool // whether cgo files are included 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 Compiler string // compiler to assume when computing target paths
// The build, tool, and release tags specify build constraints // The build, tool, and release tags specify build constraints