mirror of
https://github.com/golang/go
synced 2024-11-05 16:26:11 -07:00
godoc: periodically refresh package directory and search index.
R=adg, bradfitz CC=golang-codereviews https://golang.org/cl/55080043
This commit is contained in:
parent
8aae138131
commit
7ecad5bf71
@ -1483,12 +1483,11 @@ func (c *Corpus) RunIndexer() {
|
||||
}
|
||||
}
|
||||
|
||||
// repeatedly update the index when it goes out of date
|
||||
// Repeatedly update the package directory tree and index.
|
||||
// TODO(bgarcia): Use fsnotify to only update when notified of a filesystem change.
|
||||
for {
|
||||
if !c.indexUpToDate() {
|
||||
// index possibly out of date - make a new one
|
||||
c.initFSTree()
|
||||
c.UpdateIndex()
|
||||
}
|
||||
if c.IndexInterval < 0 {
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user