Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(291)

Side by Side Diff: src/cmd/godoc/doc.go

Issue 6350086: code review 6350086: cmd/godoc: delete -path flag (Closed)
Patch Set: diff -r 695f65745351 https://code.google.com/p/go Created 11 years, 8 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/cmd/godoc/godoc.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2009 The Go Authors. All rights reserved. 1 // Copyright 2009 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style 2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file. 3 // license that can be found in the LICENSE file.
4 4
5 /* 5 /*
6 6
7 Godoc extracts and generates documentation for Go programs. 7 Godoc extracts and generates documentation for Go programs.
8 8
9 It has two modes. 9 It has two modes.
10 10
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 index throttle value; a value of 0 means no time is allocated 60 index throttle value; a value of 0 means no time is allocated
61 to the indexer (the indexer will never finish), a value of 1.0 61 to the indexer (the indexer will never finish), a value of 1.0
62 means that index creation is running at full throttle (other 62 means that index creation is running at full throttle (other
63 goroutines may get no time while the index is built) 63 goroutines may get no time while the index is built)
64 -write_index=false 64 -write_index=false
65 write index to a file; the file name must be specified with 65 write index to a file; the file name must be specified with
66 -index_files 66 -index_files
67 -maxresults=10000 67 -maxresults=10000
68 maximum number of full text search results shown 68 maximum number of full text search results shown
69 (no full text index is built if maxresults <= 0) 69 (no full text index is built if maxresults <= 0)
70 -path=""
71 additional package directories (colon-separated)
72 -html 70 -html
73 print HTML in command-line mode 71 print HTML in command-line mode
74 -goroot=$GOROOT 72 -goroot=$GOROOT
75 Go root directory 73 Go root directory
76 -http=addr 74 -http=addr
77 HTTP service address (e.g., '127.0.0.1:6060' or just ':6060') 75 HTTP service address (e.g., '127.0.0.1:6060' or just ':6060')
78 -server=addr 76 -server=addr
79 webserver address for command line searches 77 webserver address for command line searches
80 -templates="" 78 -templates=""
81 directory containing alternate template files; if set, 79 directory containing alternate template files; if set,
82 the directory may provide alternative template files 80 the directory may provide alternative template files
83 for the files in $GOROOT/lib/godoc 81 for the files in $GOROOT/lib/godoc
84 -url=path 82 -url=path
85 print to standard output the data that would be served by 83 print to standard output the data that would be served by
86 an HTTP request for path 84 an HTTP request for path
87 -zip="" 85 -zip=""
88 zip file providing the file system to serve; disabled if empty 86 zip file providing the file system to serve; disabled if empty
89 87
90 By default, godoc looks at the packages it finds via $GOROOT and $GOPATH (if set ). 88 By default, godoc looks at the packages it finds via $GOROOT and $GOPATH (if set ).
91 Additional directories may be specified via the -path flag which accepts a list 89 This behavior can be altered by providing an alternative $GOROOT with the -goroo t
92 of colon-separated paths; unrooted paths are relative to the current working 90 flag.
93 directory. Each path is considered as an additional root for packages in order
94 of appearance. The last (absolute) path element is the prefix for the package
95 path. For instance, given the flag value:
96
97 » path=".:/home/bar:/public"
98
99 for a godoc started in /home/user/godoc, absolute paths are mapped to package pa ths
100 as follows:
101
102 » /home/user/godoc/x -> godoc/x
103 » /home/bar/x -> bar/x
104 » /public/x -> public/x
105 91
106 When godoc runs as a web server and -index is set, a search index is maintained. 92 When godoc runs as a web server and -index is set, a search index is maintained.
107 The index is created at startup. 93 The index is created at startup.
108 94
109 The index contains both identifier and full text search information (searchable 95 The index contains both identifier and full text search information (searchable
110 via regular expressions). The maximum number of full text search results shown 96 via regular expressions). The maximum number of full text search results shown
111 can be set with the -maxresults flag; if set to 0, no full text results are 97 can be set with the -maxresults flag; if set to 0, no full text results are
112 shown, and only an identifier index but no full text search index is created. 98 shown, and only an identifier index but no full text search index is created.
113 99
114 The presentation mode of web pages served by godoc can be controlled with the 100 The presentation mode of web pages served by godoc can be controlled with the
(...skipping 20 matching lines...) Expand all
135 121
136 one may run godoc as follows: 122 one may run godoc as follows:
137 123
138 godoc -http=:6060 -zip=go.zip -goroot=$HOME/go 124 godoc -http=:6060 -zip=go.zip -goroot=$HOME/go
139 125
140 See "Godoc: documenting Go code" for how to write good comments for godoc: 126 See "Godoc: documenting Go code" for how to write good comments for godoc:
141 http://golang.org/doc/articles/godoc_documenting_go_code.html 127 http://golang.org/doc/articles/godoc_documenting_go_code.html
142 128
143 */ 129 */
144 package documentation 130 package documentation
OLDNEW
« no previous file with comments | « no previous file | src/cmd/godoc/godoc.go » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b