Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
e8fb0b01
Commit
e8fb0b01
authored
Mar 19, 2010
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
godoc: revert change 5089, per gri's instructions
R=gri CC=golang-dev
https://golang.org/cl/630043
parent
7190fdd3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
28 deletions
+6
-28
lib/godoc/search.txt
lib/godoc/search.txt
+3
-4
src/cmd/godoc/godoc.go
src/cmd/godoc/godoc.go
+3
-24
No files found.
lib/godoc/search.txt
View file @
e8fb0b01
QUERY
{Query}
QUERY = {Query}
{.section Accurate}
{.or}
...
...
@@ -22,7 +21,7 @@ package {Pak.Name}
{.repeated section Files}
{.repeated section Groups}
{.repeated section Infos}
{File.Path}:{@|infoLine}
{File.Path
|url-src
}:{@|infoLine}
{.end}
{.end}
{.end}
...
...
@@ -37,7 +36,7 @@ package {Pak.Name}
{.repeated section Files}
{.repeated section Groups}
{.repeated section Infos}
{File.Path}:{@|infoLine}
{File.Path
|url-src
}:{@|infoLine}
{.end}
{.end}
{.end}
...
...
src/cmd/godoc/godoc.go
View file @
e8fb0b01
...
...
@@ -1375,6 +1375,9 @@ func indexer() {
nwords
,
nspots
:=
index
.
Size
()
log
.
Stderrf
(
"index updated (%gs, %d unique words, %d spots)"
,
secs
,
nwords
,
nspots
)
}
log
.
Stderrf
(
"bytes=%d footprint=%d
\n
"
,
runtime
.
MemStats
.
HeapAlloc
,
runtime
.
MemStats
.
InusePages
<<
12
)
runtime
.
GC
()
log
.
Stderrf
(
"bytes=%d footprint=%d
\n
"
,
runtime
.
MemStats
.
HeapAlloc
,
runtime
.
MemStats
.
InusePages
<<
12
)
}
time
.
Sleep
(
1
*
60e9
)
// try once a minute
}
...
...
@@ -1394,29 +1397,5 @@ type IndexServer struct{}
func
(
s
*
IndexServer
)
Lookup
(
query
*
Query
,
result
*
SearchResult
)
os
.
Error
{
*
result
=
lookup
(
query
.
Query
)
if
hit
:=
result
.
Hit
;
hit
!=
nil
{
// the hitlists contain absolute server file paths;
// convert them into relative paths on the server
// because the client usually has a different file
// mapping
mapHitList
(
hit
.
Decls
)
mapHitList
(
hit
.
Others
)
}
return
nil
}
func
mapHitList
(
list
HitList
)
{
for
_
,
prun
:=
range
list
{
for
_
,
frun
:=
range
prun
.
Files
{
// convert absolute file paths to relative paths
f
:=
frun
.
File
if
f
!=
nil
&&
len
(
f
.
Path
)
>
0
&&
f
.
Path
[
0
]
==
'/'
{
f
.
Path
=
relativePath
(
f
.
Path
)
}
// TODO(gri) convert SpotInfos containing snippets
// so that the line number is available
// on the client side
}
}
}
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