cmd/go: document that "main" is a reserved import path

Fixes #6312.

R=golang-dev, dave
CC=golang-dev
https://golang.org/cl/13391049
This commit is contained in:
Rob Pike 2013-09-16 22:53:12 +10:00
parent ab578e12ff
commit 29b4de25b3
2 changed files with 20 additions and 10 deletions

View File

@ -542,12 +542,17 @@ environment variable (see 'go help gopath').
If no import paths are given, the action applies to the If no import paths are given, the action applies to the
package in the current directory. package in the current directory.
The special import path "all" expands to all package directories There are three reserved names for paths that should not be used
found in all the GOPATH trees. For example, 'go list all' for packages to be built with the go tool:
lists all the packages on the local system.
The special import path "std" is like all but expands to just the - "main" denotes the top-level package in a stand-alone executable.
packages in the standard Go library.
- "all" expands to all package directories found in all the GOPATH
trees. For example, 'go list all' lists all the packages on the local
system.
- "std" is like all but expands to just the packages in the standard
Go library.
An import path is a pattern if it includes one or more "..." wildcards, An import path is a pattern if it includes one or more "..." wildcards,
each of which can match any string, including the empty string and each of which can match any string, including the empty string and

View File

@ -25,12 +25,17 @@ environment variable (see 'go help gopath').
If no import paths are given, the action applies to the If no import paths are given, the action applies to the
package in the current directory. package in the current directory.
The special import path "all" expands to all package directories There are three reserved names for paths that should not be used
found in all the GOPATH trees. For example, 'go list all' for packages to be built with the go tool:
lists all the packages on the local system.
The special import path "std" is like all but expands to just the - "main" denotes the top-level package in a stand-alone executable.
packages in the standard Go library.
- "all" expands to all package directories found in all the GOPATH
trees. For example, 'go list all' lists all the packages on the local
system.
- "std" is like all but expands to just the packages in the standard
Go library.
An import path is a pattern if it includes one or more "..." wildcards, An import path is a pattern if it includes one or more "..." wildcards,
each of which can match any string, including the empty string and each of which can match any string, including the empty string and