diff options
Diffstat (limited to 'src/cmd/godoc/main.go')
| -rw-r--r-- | src/cmd/godoc/main.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cmd/godoc/main.go b/src/cmd/godoc/main.go index 5436088f7..f7dc522f2 100644 --- a/src/cmd/godoc/main.go +++ b/src/cmd/godoc/main.go @@ -241,14 +241,16 @@ func main() { relpath = relativePath(path) } - info := pkgHandler.getPageInfo(abspath, relpath, *genAST, true) + // TODO(gri): Provide a mechanism (flag?) to select a package + // if there are multiple packages in a directory. + info := pkgHandler.getPageInfo(abspath, relpath, "", *genAST, true) if info.PAst == nil && info.PDoc == nil && info.Dirs == nil { // try again, this time assume it's a command if len(path) > 0 && path[0] != '/' { abspath = absolutePath(path, cmdHandler.fsRoot) } - info = cmdHandler.getPageInfo(abspath, relpath, false, false) + info = cmdHandler.getPageInfo(abspath, relpath, "", false, false) } if info.PDoc != nil && flag.NArg() > 1 { |
