Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(290)

Unified Diff: src/cmd/godoc/index.go

Issue 2098044: code review 2098044: godoc: moved package directory support code into separa... (Closed)
Patch Set: code review 2098044: godoc: moved package directory support code into separa... Created 14 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/cmd/godoc/godoc.go ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/cmd/godoc/index.go
===================================================================
--- a/src/cmd/godoc/index.go
+++ b/src/cmd/godoc/index.go
@@ -583,6 +583,15 @@
}
+func pkgName(filename string) string {
+ file, err := parser.ParseFile(filename, nil, parser.PackageClauseOnly)
+ if err != nil || file == nil {
+ return ""
+ }
+ return file.Name.Name
+}
+
+
func (x *Indexer) VisitFile(path string, f *os.FileInfo) {
if !isGoFile(f) {
return
« no previous file with comments | « src/cmd/godoc/godoc.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b