]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: document that files beginning with . or _ are ignored
authorAndrew Gerrand <adg@golang.org>
Thu, 20 Jun 2013 00:29:38 +0000 (10:29 +1000)
committerAndrew Gerrand <adg@golang.org>
Thu, 20 Jun 2013 00:29:38 +0000 (10:29 +1000)
Fixes #5655.

R=golang-dev, minux.ma, r
CC=golang-dev
https://golang.org/cl/10410045

src/cmd/go/doc.go
src/cmd/go/help.go
src/cmd/go/test.go

index f4269a871788e3cd2046ca23df96a7bcb8c37969..0a2e4826c7fdc4720ede62f4097b5dd9082773cb 100644 (file)
@@ -396,9 +396,11 @@ It prints a summary of the test results in the format:
 
 followed by detailed output for each failed package.
 
-'Go test' recompiles each package along with any files with names ending in
-"_test.go".  These additional files can contain test functions,
-benchmark functions, and example functions.  See 'go help testfunc' for more.
+'Go test' recompiles each package along with any files with names matching
+the file pattern "*_test.go".
+Files whose names begin with "_" (including "_test.go") or "." are ignored.
+These additional files can contain test functions, benchmark functions, and
+example functions.  See 'go help testfunc' for more.
 Each listed package causes the execution of a separate test binary.
 
 Test files that declare a package with the suffix "_test" will be compiled as a
@@ -584,6 +586,8 @@ single directory, the command is applied to a single synthesized
 package made up of exactly those files, ignoring any build constraints
 in those files and ignoring any other files in the directory.
 
+File names that begin with "." or "_" are ignored by the go tool.
+
 
 Remote import path syntax
 
index c70a25fdd7a5797a650f9868f54b1915f66bce29..c1aa32a539e942b54bb13236539740103e2730ff 100644 (file)
@@ -53,6 +53,8 @@ As a special case, if the package list is a list of .go files from a
 single directory, the command is applied to a single synthesized
 package made up of exactly those files, ignoring any build constraints
 in those files and ignoring any other files in the directory.
+
+File names that begin with "." or "_" are ignored by the go tool.
        `,
 }
 
index c06fe378b41b284d2121982d53f72871f73315ad..2e235265306952db715e69280df385a8b9e6d8e8 100644 (file)
@@ -45,9 +45,11 @@ It prints a summary of the test results in the format:
 
 followed by detailed output for each failed package.
 
-'Go test' recompiles each package along with any files with names ending in
-"_test.go".  These additional files can contain test functions,
-benchmark functions, and example functions.  See 'go help testfunc' for more.
+'Go test' recompiles each package along with any files with names matching
+the file pattern "*_test.go". 
+Files whose names begin with "_" (including "_test.go") or "." are ignored.
+These additional files can contain test functions, benchmark functions, and
+example functions.  See 'go help testfunc' for more.
 Each listed package causes the execution of a separate test binary.
 
 Test files that declare a package with the suffix "_test" will be compiled as a