Commit 6f6ff951 authored by Rob Pike's avatar Rob Pike

go/build: mention 'tag' as an alias for 'build constraint'

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
parent 9144ef33
...@@ -87,8 +87,8 @@ The build flags are shared by the build, install, run, and test commands: ...@@ -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. arguments to pass on each 5l, 6l, or 8l linker invocation.
-tags 'tag list' -tags 'tag list'
a list of build tags to consider satisfied during the build. a list of build tags to consider satisfied during the build.
See the documentation for the go/build package for For more information about build tags, see the description of
more information about build tags. build constraints in the documentation for the go/build package.
The list flags accept a space-separated list of strings. To embed spaces 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. in an element in the list, surround it with either single or double quotes.
......
...@@ -104,8 +104,8 @@ The build flags are shared by the build, install, run, and test commands: ...@@ -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. arguments to pass on each 5l, 6l, or 8l linker invocation.
-tags 'tag list' -tags 'tag list'
a list of build tags to consider satisfied during the build. a list of build tags to consider satisfied during the build.
See the documentation for the go/build package for For more information about build tags, see the description of
more information about build tags. build constraints in the documentation for the go/build package.
The list flags accept a space-separated list of strings. To embed spaces 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. in an element in the list, surround it with either single or double quotes.
......
...@@ -57,11 +57,15 @@ ...@@ -57,11 +57,15 @@
// //
// Build Constraints // 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. // 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 // Constraints may appear in any kind of source file (not just Go), but
// they must appear near the top of the file, preceded // 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 // To distinguish build constraints from package documentation, a series of
// build constraints must be followed by a blank line. // build constraints must be followed by a blank line.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment