1
0
mirror of https://github.com/golang/go synced 2024-10-02 16:28:34 -06:00

godoc: diagnostic for empty FS tree

R=adg
CC=golang-dev
https://golang.org/cl/5615055
This commit is contained in:
Robert Griesemer 2012-02-03 08:33:29 -08:00
parent 870c9d1c09
commit bd41831f66

View File

@ -114,7 +114,12 @@ func registerPublicHandlers(mux *http.ServeMux) {
}
func initFSTree() {
fsTree.set(newDirectory(filepath.Join(*goroot, *testDir), nil, -1))
dir := newDirectory(filepath.Join(*goroot, *testDir), nil, -1)
if dir == nil {
log.Println("Warning: FSTree is nil")
return
}
fsTree.set(dir)
invalidateIndex()
}