mirror of https://github.com/golang/go.git
cmd/cgo: mention //go:build line in godoc
Say "//go:build" instead of "// +build" in the package level godoc comment. Change-Id: I4700227a03197ffbe29e4de04d068b4c63bb5bf0 Reviewed-on: https://go-review.googlesource.com/c/go/+/431856 Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Cherry Mui <cherryyz@google.com> Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Ian Lance Taylor <iant@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Ian Lance Taylor <iant@google.com>
This commit is contained in:
parent
1eeb257b88
commit
b5fcb35b31
|
|
@ -125,7 +125,7 @@ environment variable when running the go tool: set it to 1 to enable
|
|||
the use of cgo, and to 0 to disable it. The go tool will set the
|
||||
build constraint "cgo" if cgo is enabled. The special import "C"
|
||||
implies the "cgo" build constraint, as though the file also said
|
||||
"// +build cgo". Therefore, if cgo is disabled, files that import
|
||||
"//go:build cgo". Therefore, if cgo is disabled, files that import
|
||||
"C" will not be built by the go tool. (For more about build constraints
|
||||
see https://golang.org/pkg/go/build/#hdr-Build_Constraints).
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue