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
79284cae
Commit
79284cae
authored
Nov 06, 2009
by
Robert Griesemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gofmt'ed src/cmd
R=rsc
http://go/go-review/1024004
parent
07b6becc
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
+8
-8
godoc.go
src/cmd/godoc/godoc.go
+5
-6
main.go
src/cmd/godoc/main.go
+1
-1
spec.go
src/cmd/godoc/spec.go
+2
-1
No files found.
src/cmd/godoc/godoc.go
View file @
79284cae
...
...
@@ -86,7 +86,7 @@ var (
)
var
fsTree
RWValue
;
// *Directory tree of packages, updated with each sync
var
fsTree
RWValue
// *Directory tree of packages, updated with each sync
func
init
()
{
...
...
@@ -224,7 +224,7 @@ func (dir *Directory) lookup(path string) *Directory {
return
d
;
}
}
return
nil
return
nil
;
}
return
dir
.
lookup
(
dpath
)
.
lookup
(
dname
);
...
...
@@ -425,7 +425,7 @@ func dirFmt(w io.Writer, x interface{}, format string) {
func
removePrefix
(
s
,
prefix
string
)
string
{
if
strings
.
HasPrefix
(
s
,
prefix
)
{
return
s
[
len
(
prefix
)
:
len
(
s
)];
return
s
[
len
(
prefix
)
:
len
(
s
)];
}
return
s
;
}
...
...
@@ -761,7 +761,7 @@ func (h *httpHandler) getPageInfo(path string) PageInfo {
func
(
h
*
httpHandler
)
ServeHTTP
(
c
*
http
.
Conn
,
r
*
http
.
Request
)
{
path
:=
r
.
Url
.
Path
;
path
=
path
[
len
(
h
.
pattern
)
:
len
(
path
)];
path
=
path
[
len
(
h
.
pattern
)
:
len
(
path
)];
// canonicalize URL path and redirect if necessary
if
canonical
:=
pathutil
.
Clean
(
h
.
pattern
+
path
)
+
"/"
;
r
.
Url
.
Path
!=
canonical
{
...
...
@@ -797,7 +797,7 @@ func (h *httpHandler) ServeHTTP(c *http.Conn, r *http.Request) {
_
,
pkgname
:=
pathutil
.
Split
(
pathutil
.
Clean
(
path
));
title
=
"Command "
+
pkgname
;
default
:
title
=
"Command "
+
info
.
PDoc
.
PackageName
title
=
"Command "
+
info
.
PDoc
.
PackageName
;
}
}
...
...
@@ -885,4 +885,3 @@ func indexer() {
time
.
Sleep
(
1
*
60e9
);
// try once a minute
}
}
src/cmd/godoc/main.go
View file @
79284cae
...
...
@@ -98,7 +98,7 @@ func exec(c *http.Conn, args []string) (status int) {
// Maximum directory depth, adjust as needed.
const
maxDirDepth
=
24
;
const
maxDirDepth
=
24
func
dosync
(
c
*
http
.
Conn
,
r
*
http
.
Request
)
{
args
:=
[]
string
{
"/bin/sh"
,
"-c"
,
*
syncCmd
};
...
...
src/cmd/godoc/spec.go
View file @
79284cae
...
...
@@ -125,7 +125,8 @@ func (p *ebnfParser) parseTerm() bool {
func
(
p
*
ebnfParser
)
parseSequence
()
{
for
p
.
parseTerm
()
{}
for
p
.
parseTerm
()
{
}
}
...
...
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