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 | d032e5b3e9f2e3db62150bbbb0383ed0d045ef37 (patch) | |
tree | b734bf9da966d8eaa0d6150ca9230a4b772349c3 /src/cmd/8a | |
parent | 22d1ac51b328c9fe2fbfc572a4920f1946f162e4 (diff) | |
download | go-d032e5b3e9f2e3db62150bbbb0383ed0d045ef37.tar.gz |
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 issue 4806.
R=adg, rsc, dave, bradfitz
CC=golang-dev
https://codereview.appspot.com/7333046
Diffstat (limited to 'src/cmd/8a')
-rw-r--r-- | src/cmd/8a/doc.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cmd/8a/doc.go b/src/cmd/8a/doc.go index 59f286e19..737c56f13 100644 --- a/src/cmd/8a/doc.go +++ b/src/cmd/8a/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 + /* 8a is a version of the Plan 9 assembler. The original is documented at @@ -11,4 +13,4 @@ Its target architecture is the x86, referred to by these tools for historical reasons as 386. */ -package documentation +package main |