From 3ee87d02b063e368259486d83e4ea391538f84c2 Mon Sep 17 00:00:00 2001 From: Robert Griesemer Date: Tue, 19 Feb 2013 11:19:58 -0800 Subject: 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 --- src/cmd/fix/doc.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/cmd/fix') diff --git a/src/cmd/fix/doc.go b/src/cmd/fix/doc.go index a92e0fc06f..5de3e08c59 100644 --- a/src/cmd/fix/doc.go +++ b/src/cmd/fix/doc.go @@ -33,4 +33,4 @@ Fix does not make backup copies of the files that it edits. Instead, use a version control system's ``diff'' functionality to inspect the changes that fix makes before committing them. */ -package documentation +package main -- cgit v1.3-5-g45d5