Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
db9a9662
Commit
db9a9662
authored
Feb 16, 2010
by
Robert Griesemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
godoc: updated documentation
R=r CC=golang-dev
https://golang.org/cl/207112
parent
7db472fd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
8 deletions
+24
-8
doc.go
src/cmd/godoc/doc.go
+23
-7
godoc.go
src/cmd/godoc/godoc.go
+1
-1
No files found.
src/cmd/godoc/doc.go
View file @
db9a9662
...
...
@@ -25,12 +25,14 @@ The flags are:
verbose mode
-tabwidth=4
width of tabs in units of spaces
-cmdroot="src/cmd"
root command source directory (if unrooted, relative to -goroot)
-tmplroot="lib/godoc"
root template directory (if unrooted, relative to -goroot)
-pkgroot="src/pkg"
root package source directory (if unrooted, relative to -goroot)
-path=""
additional package directories (colon-separated)
-cmdroot="/goroot/src/cmd"
command source directory under -goroot (if unrooted, relative to cwd)
-tmplroot="/goroot/lib/godoc"
template directory under -goroot (if unrooted, relative to cwd)
-pkgroot="/goroot/src/pkg"
package source directory under -goroot (if unrooted, relative to cwd)
-html
print HTML in command-line mode
-goroot=$GOROOT
...
...
@@ -44,8 +46,22 @@ The flags are:
-sync_minutes=0
sync interval in minutes; sync is disabled if <= 0
The -path flag accepts a list of colon-separated paths; unrooted paths are relative
to the current working directory. Each path is considered as an additional root for
packages in order of appearance. The last (absolute) path element is the prefix for
the package path. For instance, given the flag value:
path=".:/home/bar:/public"
for a godoc started in /home/user/godoc, absolute paths are mapped to package paths
as follows:
/home/user/godoc/x -> godoc/x
/home/bar/x -> bar/x
/public/x -> public/x
When godoc runs as a web server, it creates a search index from all .go files
under
$GOROOT
(excluding files starting with .). The index is created at startup
under
-goroot
(excluding files starting with .). The index is created at startup
and is automatically updated every time the -sync command terminates with exit
status 0, indicating that files have changed.
...
...
src/cmd/godoc/godoc.go
View file @
db9a9662
...
...
@@ -84,7 +84,7 @@ var (
tmplroot
string
// additional file system roots to consider
path
=
flag
.
String
(
"path"
,
""
,
"additional p
kg directories
"
)
path
=
flag
.
String
(
"path"
,
""
,
"additional p
ackage directories (colon-separated)
"
)
// layout control
tabwidth
=
flag
.
Int
(
"tabwidth"
,
4
,
"tab width"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment