aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2015-12-17 02:24:07 -0500
committerRuss Cox <rsc@golang.org>2015-12-17 17:04:55 +0000
commite357eb97a695d62c3102973f7384a15cb664b519 (patch)
treeca6b9d27a1a1daf3bead26f41b1b5181802a129b
parentaaa0bc1043883390e052ec6f6775cbf0395dceb1 (diff)
downloadgo-e357eb97a695d62c3102973f7384a15cb664b519.tar.gz
go-e357eb97a695d62c3102973f7384a15cb664b519.zip
cmd/go: document that package documentation is ignored
Fixes #11801. Change-Id: I2caeac7fdddc7f29015d6db8d4b3e296c8b9c423 Reviewed-on: https://go-review.googlesource.com/17954 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-rw-r--r--src/cmd/go/help.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/cmd/go/help.go b/src/cmd/go/help.go
index e9b34c92a9..7f81241045 100644
--- a/src/cmd/go/help.go
+++ b/src/cmd/go/help.go
@@ -79,6 +79,14 @@ internally at Google all begin with 'google', and paths
denoting remote repositories begin with the path to the code,
such as 'github.com/user/repo'.
+Packages in a program need not have unique package names,
+but there are two reserved package names with special meaning.
+The name main indicates a command, not a library.
+Commands are built into binaries and cannot be imported.
+The name documentation indicates documentation for
+a non-Go program in the directory. Files in package documentation
+are ignored by the go command.
+
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