diff --git a/website/godoc.go b/website/godoc.go index 4fb0caa04..a2159b751 100644 --- a/website/godoc.go +++ b/website/godoc.go @@ -239,6 +239,10 @@ func getPageInfo(pkgName, diskPath string) (pi PageInfo, err error) { } bpkg, err := build.ImportDir(diskPath, 0) if err != nil { + if _, ok := err.(*build.NoGoError); ok { + pi.populateDirs(diskPath, -1) + return pi, nil + } return } inSet := make(map[string]bool) @@ -274,7 +278,7 @@ func getPageInfo(pkgName, diskPath string) (pi PageInfo, err error) { pi.IsPkg = strings.Contains(pkgName, domainName+pkgPattern) // get directory information - pi.populateDirs(diskPath, 1) + pi.populateDirs(diskPath, -1) return }