diff --git a/cmd/godoc/main.go b/cmd/godoc/main.go index 5d633877..65843dd4 100644 --- a/cmd/godoc/main.go +++ b/cmd/godoc/main.go @@ -241,8 +241,10 @@ func main() { if *writeIndex { corpus.IndexThrottle = 1.0 corpus.IndexEnabled = true + initCorpus(corpus) + } else { + go initCorpus(corpus) } - go initCorpus(corpus) // Initialize the version info before readTemplates, which saves // the map value in a method value.