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 {
|
for {
|
||||||
if !c.indexUpToDate() {
|
c.initFSTree()
|
||||||
// index possibly out of date - make a new one
|
c.UpdateIndex()
|
||||||
c.UpdateIndex()
|
|
||||||
}
|
|
||||||
if c.IndexInterval < 0 {
|
if c.IndexInterval < 0 {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue