]> Cypherpunks repositories - gostls13.git/commitdiff
go/build: mention 'tag' as an alias for 'build constraint'
authorRob Pike <r@golang.org>
Thu, 19 Dec 2013 19:43:34 +0000 (11:43 -0800)
committerRob Pike <r@golang.org>
Thu, 19 Dec 2013 19:43:34 +0000 (11:43 -0800)
The code is all about tags, and the cmd/go documentation
said to look in the go/build documentation for information
about tags, but the documentation said nothing about tags,
only build constraints. Make things clearer.

R=golang-dev, adg, rsc
CC=golang-dev
https://golang.org/cl/44100043

src/cmd/go/build.go
src/cmd/go/doc.go
src/pkg/go/build/doc.go

index 3ef4d8c9ce0bed6033725d015da9516b031523b3..c78f228105690a0c998bb965f5b140faf9080fd8 100644 (file)
@@ -87,8 +87,8 @@ The build flags are shared by the build, install, run, and test commands:
                arguments to pass on each 5l, 6l, or 8l linker invocation.
        -tags 'tag list'
                a list of build tags to consider satisfied during the build.
-               See the documentation for the go/build package for
-               more information about build tags.
+               For more information about build tags, see the description of
+               build constraints in the documentation for the go/build package.
 
 The list flags accept a space-separated list of strings. To embed spaces
 in an element in the list, surround it with either single or double quotes.
index ebb2f37fd192450a88eb5622c8937026b0bed328..9a8a194fe755d2a424e346dbdb03a4d18402048e 100644 (file)
@@ -104,8 +104,8 @@ The build flags are shared by the build, install, run, and test commands:
                arguments to pass on each 5l, 6l, or 8l linker invocation.
        -tags 'tag list'
                a list of build tags to consider satisfied during the build.
-               See the documentation for the go/build package for
-               more information about build tags.
+               For more information about build tags, see the description of
+               build constraints in the documentation for the go/build package.
 
 The list flags accept a space-separated list of strings. To embed spaces
 in an element in the list, surround it with either single or double quotes.
index b2f04ea45cf9434b70421edb8f4da713c854627e..83292f29f82fb423cd15fe1611d2ae4537e1f0b5 100644 (file)
 //
 // Build Constraints
 //
-// A build constraint is a line comment beginning with the directive +build
+// A build constraint, also known as a build tag, is a line comment that begins
+//
+//     // +build
+//
 // that lists the conditions under which a file should be included in the package.
 // Constraints may appear in any kind of source file (not just Go), but
 // they must appear near the top of the file, preceded
-// only by blank lines and other line comments.
+// only by blank lines and other line comments. These rules mean that in Go
+// files a build constraint must appear before the package clause.
 //
 // To distinguish build constraints from package documentation, a series of
 // build constraints must be followed by a blank line.