cmd/godoc: synchronously init corpus for index mode
The corpus needs to be init'd before generating the index. Regression caused by CL 141397. Updates golang/go#25443. Change-Id: I04d19bf5d279031cc8ddf0f850d81eb06fc5efa8 Reviewed-on: https://go-review.googlesource.com/c/141717 Run-TryBot: Chris Broadfoot <cbro@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
157aeed469
commit
d3c6139142
|
@ -241,8 +241,10 @@ func main() {
|
||||||
if *writeIndex {
|
if *writeIndex {
|
||||||
corpus.IndexThrottle = 1.0
|
corpus.IndexThrottle = 1.0
|
||||||
corpus.IndexEnabled = true
|
corpus.IndexEnabled = true
|
||||||
|
initCorpus(corpus)
|
||||||
|
} else {
|
||||||
|
go initCorpus(corpus)
|
||||||
}
|
}
|
||||||
go initCorpus(corpus)
|
|
||||||
|
|
||||||
// Initialize the version info before readTemplates, which saves
|
// Initialize the version info before readTemplates, which saves
|
||||||
// the map value in a method value.
|
// the map value in a method value.
|
||||||
|
|
Loading…
Reference in New Issue