diff options
| author | Robert Griesemer <gri@golang.org> | 2013-02-19 11:19:58 -0800 |
|---|---|---|
| committer | Robert Griesemer <gri@golang.org> | 2013-02-19 11:19:58 -0800 |
| commit | 3ee87d02b063e368259486d83e4ea391538f84c2 (patch) | |
| tree | fe4143f4630b68b5dedcf73163fde1fb3740af7d /src/pkg/exp | |
| parent | 04567299771d99206101e3273b1851518cad491a (diff) | |
| download | go-3ee87d02b063e368259486d83e4ea391538f84c2.tar.xz | |
cmd/godoc: use go/build to determine package and example files
Also:
- faster code for example extraction
- simplify handling of command documentation:
all "main" packages are treated as commands
- various minor cleanups along the way
For commands written in Go, any doc.go file containing
documentation must now be part of package main (rather
then package documentation), otherwise the documentation
won't show up in godoc (it will still build, though).
For commands written in C, documentation may still be
in doc.go files defining package documentation, but the
recommended way is to explicitly ignore those files with
a +build ignore constraint to define package main.
Fixes #4806.
R=adg, rsc, dave, bradfitz
CC=golang-dev
https://golang.org/cl/7333046
Diffstat (limited to 'src/pkg/exp')
| -rw-r--r-- | src/pkg/exp/ebnflint/doc.go | 2 | ||||
| -rw-r--r-- | src/pkg/exp/gotype/doc.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/pkg/exp/ebnflint/doc.go b/src/pkg/exp/ebnflint/doc.go index 4bb22a4cb8..796a59fb65 100644 --- a/src/pkg/exp/ebnflint/doc.go +++ b/src/pkg/exp/ebnflint/doc.go @@ -19,4 +19,4 @@ The --start flag specifies the name of the start production for the grammar; it defaults to "Start". */ -package documentation +package main diff --git a/src/pkg/exp/gotype/doc.go b/src/pkg/exp/gotype/doc.go index 1168086771..4d980f80dc 100644 --- a/src/pkg/exp/gotype/doc.go +++ b/src/pkg/exp/gotype/doc.go @@ -58,6 +58,6 @@ To verify the output of a pipe: echo "package foo" | gotype */ -package documentation +package main // BUG(gri): At the moment, only single-file scope analysis is performed. |
