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
ca075494
Commit
ca075494
authored
Feb 16, 2010
by
Robert Griesemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
godoc: initialize vars depending on flags after parsing the flags.
R=rsc CC=golang-dev
https://golang.org/cl/206109
parent
ffd09613
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
godoc.go
src/cmd/godoc/godoc.go
+3
-1
main.go
src/cmd/godoc/main.go
+1
-0
No files found.
src/cmd/godoc/godoc.go
View file @
ca075494
...
...
@@ -111,10 +111,12 @@ func init() {
flag
.
StringVar
(
&
cmdroot
,
"cmdroot"
,
pathutil
.
Join
(
goroot
,
"src/cmd"
),
"command source directory"
)
flag
.
StringVar
(
&
pkgroot
,
"pkgroot"
,
pathutil
.
Join
(
goroot
,
"src/pkg"
),
"package source directory"
)
flag
.
StringVar
(
&
tmplroot
,
"tmplroot"
,
pathutil
.
Join
(
goroot
,
"lib/godoc"
),
"template directory"
)
}
func
initHandlers
()
{
fsMap
.
Init
(
*
path
)
fileServer
=
http
.
FileServer
(
goroot
,
""
)
cmdHandler
=
httpHandler
{
"/cmd/"
,
cmdroot
,
false
}
pkgHandler
=
httpHandler
{
"/pkg/"
,
pkgroot
,
true
}
}
...
...
src/cmd/godoc/main.go
View file @
ca075494
...
...
@@ -152,6 +152,7 @@ func main() {
log
.
Exitf
(
"negative tabwidth %d"
,
*
tabwidth
)
}
initHandlers
()
readTemplates
()
if
*
httpaddr
!=
""
{
...
...
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