diff options
author | Filippo Valsorda <filippo@golang.org> | 2019-08-19 13:17:34 -0400 |
---|---|---|
committer | Filippo Valsorda <filippo@golang.org> | 2019-08-20 19:26:11 +0000 |
commit | 53c088fbf05f42b24e1f7aa40889ca51055f9f29 (patch) | |
tree | 99a8c75053c2b6f0c8e88547eec0899659922faa | |
parent | d6ffc1d8394d6f6420bb92d79d320da88720fbe0 (diff) | |
download | go-53c088fbf05f42b24e1f7aa40889ca51055f9f29.tar.gz go-53c088fbf05f42b24e1f7aa40889ca51055f9f29.zip |
cmd/go: fix "go help build -o" docs
The docs refer to "the last two paragraphs", but in fact should refer to
the first two of the previous three paragraphs. Moved up the out of place
paragraph.
Updates #14295
Change-Id: I066da7a665bc6754d246782b941af214a385017a
Reviewed-on: https://go-review.googlesource.com/c/go/+/190839
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
-rw-r--r-- | src/cmd/go/alldocs.go | 4 | ||||
-rw-r--r-- | src/cmd/go/internal/work/build.go | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/cmd/go/alldocs.go b/src/cmd/go/alldocs.go index f15ff16abe..63ec2321be 100644 --- a/src/cmd/go/alldocs.go +++ b/src/cmd/go/alldocs.go @@ -78,6 +78,8 @@ // If the arguments to build are a list of .go files from a single directory, // build treats them as a list of source files specifying a single package. // +// When compiling packages, build ignores files that end in '_test.go'. +// // When compiling a single main package, build writes // the resulting executable to an output file named after // the first source file ('go build ed.go rx.go' writes 'ed' or 'ed.exe') @@ -88,8 +90,6 @@ // build compiles the packages but discards the resulting object, // serving only as a check that the packages can be built. // -// When compiling packages, build ignores files that end in '_test.go'. -// // The -o flag forces build to write the resulting executable or object // to the named output file or directory, instead of the default behavior described // in the last two paragraphs. If the named output is a directory that exists, diff --git a/src/cmd/go/internal/work/build.go b/src/cmd/go/internal/work/build.go index ed5a149da3..9305b2d859 100644 --- a/src/cmd/go/internal/work/build.go +++ b/src/cmd/go/internal/work/build.go @@ -30,6 +30,8 @@ along with their dependencies, but it does not install the results. If the arguments to build are a list of .go files from a single directory, build treats them as a list of source files specifying a single package. +When compiling packages, build ignores files that end in '_test.go'. + When compiling a single main package, build writes the resulting executable to an output file named after the first source file ('go build ed.go rx.go' writes 'ed' or 'ed.exe') @@ -40,8 +42,6 @@ When compiling multiple packages or a single non-main package, build compiles the packages but discards the resulting object, serving only as a check that the packages can be built. -When compiling packages, build ignores files that end in '_test.go'. - The -o flag forces build to write the resulting executable or object to the named output file or directory, instead of the default behavior described in the last two paragraphs. If the named output is a directory that exists, |