]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/cgo: mention //go:build line in godoc
authorTobias Klauser <tklauser@distanz.ch>
Mon, 19 Sep 2022 15:57:44 +0000 (17:57 +0200)
committerGopher Robot <gobot@golang.org>
Tue, 20 Sep 2022 15:46:03 +0000 (15:46 +0000)
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>

src/cmd/cgo/doc.go

index 7fb6179e264b5653d552c711e69a3ec6a82dc819..366844d15040e85586653d1dba4bc1ec7b49e26f 100644 (file)
@@ -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).