summaryrefslogtreecommitdiff
path: root/src/cmd/5a
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2013-02-19 11:19:58 -0800
committerRobert Griesemer <gri@golang.org>2013-02-19 11:19:58 -0800
commitd032e5b3e9f2e3db62150bbbb0383ed0d045ef37 (patch)
treeb734bf9da966d8eaa0d6150ca9230a4b772349c3 /src/cmd/5a
parent22d1ac51b328c9fe2fbfc572a4920f1946f162e4 (diff)
downloadgo-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/5a')
-rw-r--r--src/cmd/5a/doc.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cmd/5a/doc.go b/src/cmd/5a/doc.go
index 62d6ee9cd..29725db04 100644
--- a/src/cmd/5a/doc.go
+++ b/src/cmd/5a/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
+
/*
5a is a version of the Plan 9 assembler. The original is documented at
@@ -11,4 +13,4 @@
Its target architecture is the ARM, referred to by these tools as arm.
*/
-package documentation
+package main