diff --git a/godoc/server.go b/godoc/server.go index 693599b4dc..17514418c9 100644 --- a/godoc/server.go +++ b/godoc/server.go @@ -47,7 +47,7 @@ func (s *handlerServer) registerWithMux(mux *http.ServeMux) { mux.Handle(s.pattern, s) } -// getPageInfo returns the PageInfo for a package directory abspath. If the +// GetPageInfo returns the PageInfo for a package directory abspath. If the // parameter genAST is set, an AST containing only the package exports is // computed (PageInfo.PAst), otherwise package documentation (PageInfo.Doc) // is extracted from the AST. If there is no corresponding package in the diff --git a/godoc/vfs/namespace.go b/godoc/vfs/namespace.go index b8a1122d0c..4679bd45be 100644 --- a/godoc/vfs/namespace.go +++ b/godoc/vfs/namespace.go @@ -108,7 +108,7 @@ type mountedFS struct { new string } -// hasPathPrefix returns true if x == y or x == y + "/" + more +// hasPathPrefix reports whether x == y or x == y + "/" + more. func hasPathPrefix(x, y string) bool { return x == y || strings.HasPrefix(x, y) && (strings.HasSuffix(y, "/") || strings.HasPrefix(x[len(y):], "/")) }