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
aae64f8c
Commit
aae64f8c
authored
Nov 09, 2009
by
Robert Griesemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- exit godoc w/o crashing if negative tabwidth is provided
- minor related cleanups R=rsc
http://go/go-review/1025026
parent
8b04ceff
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
main.go
src/cmd/godoc/main.go
+7
-8
No files found.
src/cmd/godoc/main.go
View file @
aae64f8c
...
...
@@ -143,16 +143,13 @@ func main() {
flag
.
Usage
=
usage
;
flag
.
Parse
();
// Check usage first; get usage message out early.
switch
{
case
*
httpaddr
!=
""
:
if
flag
.
NArg
()
!=
0
{
usage
();
}
default
:
if
flag
.
NArg
()
==
0
{
// Check usage: either server and no args, or command line and args
if
(
*
httpaddr
!=
""
)
!=
(
flag
.
NArg
()
==
0
)
{
usage
();
}
if
*
tabwidth
<
0
{
log
.
Exitf
(
"negative tabwidth %d"
,
*
tabwidth
);
}
if
err
:=
os
.
Chdir
(
goroot
);
err
!=
nil
{
...
...
@@ -168,8 +165,10 @@ func main() {
log
.
Stderrf
(
"Go Documentation Server
\n
"
);
log
.
Stderrf
(
"address = %s
\n
"
,
*
httpaddr
);
log
.
Stderrf
(
"goroot = %s
\n
"
,
goroot
);
log
.
Stderrf
(
"cmdroot = %s
\n
"
,
*
cmdroot
);
log
.
Stderrf
(
"pkgroot = %s
\n
"
,
*
pkgroot
);
log
.
Stderrf
(
"tmplroot = %s
\n
"
,
*
tmplroot
);
log
.
Stderrf
(
"tabwidth = %d
\n
"
,
*
tabwidth
);
handler
=
loggingHandler
(
handler
);
}
...
...
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