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/cmd/pack | |
parent | 04567299771d99206101e3273b1851518cad491a (diff) | |
download | go-3ee87d02b063e368259486d83e4ea391538f84c2.tar.gz go-3ee87d02b063e368259486d83e4ea391538f84c2.zip |
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/cmd/pack')
-rw-r--r-- | src/cmd/pack/doc.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cmd/pack/doc.go b/src/cmd/pack/doc.go index 8b17f3ca22..67b7897318 100644 --- a/src/cmd/pack/doc.go +++ b/src/cmd/pack/doc.go @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +// +build ignore + /* Pack is a variant of the Plan 9 ar tool. The original is documented at @@ -24,4 +26,4 @@ The new option 'P' causes pack to remove the given prefix from file names in the line number information in object files that are already stored in or added to the archive. */ -package documentation +package main |