From cdde8c655ebc51a79e25730ac551804c6ee5486f Mon Sep 17 00:00:00 2001 From: mpl Date: Tue, 9 Jul 2013 22:50:10 +0200 Subject: [PATCH] website: get subdirs info even when no source files http://camlistore.org/issue/147 Change-Id: I9d0ee63bc9f8a5baa16092406dc8fa663cc7c47f --- website/godoc.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/website/godoc.go b/website/godoc.go index 03fb31cae..75c05dc73 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 }