]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: document that package documentation is ignored
authorRuss Cox <rsc@golang.org>
Thu, 17 Dec 2015 07:24:07 +0000 (02:24 -0500)
committerRuss Cox <rsc@golang.org>
Thu, 17 Dec 2015 17:04:55 +0000 (17:04 +0000)
Fixes #11801.

Change-Id: I2caeac7fdddc7f29015d6db8d4b3e296c8b9c423
Reviewed-on: https://go-review.googlesource.com/17954
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/go/help.go

index e9b34c92a9f6d87b0ad987172ca6990b2f8899fc..7f81241045ed95ef10e759cb3808b59ef427a1c4 100644 (file)
@@ -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