summaryrefslogtreecommitdiff
path: root/src/cmd/godoc/doc.go
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2012-02-29 11:23:13 +0100
committerOndřej Surý <ondrej@sury.org>2012-02-29 11:23:13 +0100
commitb6d7097a0d6072199f2cd74d67404890697cf78a (patch)
treea2193c528a79fd5606507568859ee5067c6b86e4 /src/cmd/godoc/doc.go
parent4cecda6c347bd6902b960c6a35a967add7070b0d (diff)
downloadgolang-b6d7097a0d6072199f2cd74d67404890697cf78a.tar.gz
Imported Upstream version 2012.02.22upstream-weekly/2012.02.22
Diffstat (limited to 'src/cmd/godoc/doc.go')
-rw-r--r--src/cmd/godoc/doc.go12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/cmd/godoc/doc.go b/src/cmd/godoc/doc.go
index acea2b5d0..15c393cd7 100644
--- a/src/cmd/godoc/doc.go
+++ b/src/cmd/godoc/doc.go
@@ -9,12 +9,15 @@ Godoc extracts and generates documentation for Go programs.
It has two modes.
Without the -http flag, it runs in command-line mode and prints plain text
-documentation to standard output and exits. If the -src flag is specified,
-godoc prints the exported interface of a package in Go source form, or the
-implementation of a specific exported language entity:
+documentation to standard output and exits. If both a library package and
+a command with the same name exists, using the prefix cmd/ will force
+documentation on the command rather than the library package. If the -src
+flag is specified, godoc prints the exported interface of a package in Go
+source form, or the implementation of a specific exported language entity:
godoc fmt # documentation for package fmt
godoc fmt Printf # documentation for fmt.Printf
+ godoc cmd/go # force documentation for the go command
godoc -src fmt # fmt package interface in Go source form
godoc -src fmt Printf # implementation of fmt.Printf
@@ -131,7 +134,8 @@ shown, and only an identifier index but no full text search index is created.
The presentation mode of web pages served by godoc can be controlled with the
"m" URL parameter; it accepts a comma-separated list of flag names as value:
- all show documentation for all (not just exported) declarations
+ all show documentation for all declarations, not just the exported ones
+ methods show all embedded methods, not just those of unexported anonymous fields
src show the original source code rather then the extracted documentation
text present the page in textual (command-line) form rather than HTML
flat present flat (not indented) directory listings using full paths