src/cmd/go/alldocs.go | 4 ++-- src/cmd/go/internal/work/build.go | 4 ++-- diff --git a/src/cmd/go/alldocs.go b/src/cmd/go/alldocs.go index f15ff16abecbfca3f91f90911c454ffc60624bc5..63ec2321be556cff1a8c0b6118a788054336c810 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') @@ -87,8 +89,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 diff --git a/src/cmd/go/internal/work/build.go b/src/cmd/go/internal/work/build.go index ed5a149da355f82fb4e0d6219b8b3c11f19ca255..9305b2d859c549356f1e0739aeb2d9e7e29bc4e3 100644 --- a/src/cmd/go/internal/work/build.go +++ b/src/cmd/go/internal/work/build.go @@ -30,6 +30,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') @@ -39,8 +41,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