aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2011-02-03 16:05:57 -0800
committerRobert Griesemer <gri@golang.org>2011-02-03 16:05:57 -0800
commitea2c6a3e5938b9767e4291bdfb45357af920e7f1 (patch)
treea116ea074facba3a22fd6cac63010949666ad54b /src
parent7db904c1f6e2d07d1aaa9b759c286cff627858a7 (diff)
downloadgo-ea2c6a3e5938b9767e4291bdfb45357af920e7f1.tar.xz
godoc: minor internal fix
The value of the internal flag includeNonGoFile really is the value of the fulltextIndex flag. R=rsc CC=golang-dev https://golang.org/cl/4044052
Diffstat (limited to 'src')
-rw-r--r--src/cmd/godoc/index.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/cmd/godoc/index.go b/src/cmd/godoc/index.go
index 581409cde6..56f31f5cf0 100644
--- a/src/cmd/godoc/index.go
+++ b/src/cmd/godoc/index.go
@@ -430,7 +430,6 @@ func (a *AltWords) filter(s string) *AltWords {
// Indexer
// Adjust these flags as seems best.
-const includeNonGoFiles = true
const includeMainPackages = true
const includeTestFiles = true
@@ -728,7 +727,7 @@ func isWhitelisted(filename string) bool {
}
-func (x *Indexer) visitFile(dirname string, f *os.FileInfo) {
+func (x *Indexer) visitFile(dirname string, f *os.FileInfo, fulltextIndex bool) {
if !f.IsRegular() {
return
}
@@ -746,7 +745,7 @@ func (x *Indexer) visitFile(dirname string, f *os.FileInfo) {
}
goFile = true
- case !includeNonGoFiles || !isWhitelisted(f.Name):
+ case !fulltextIndex || !isWhitelisted(f.Name):
return
}
@@ -811,7 +810,7 @@ func NewIndex(dirnames <-chan string, fulltextIndex bool) *Index {
}
for _, f := range list {
if !f.IsDirectory() {
- x.visitFile(dirname, f)
+ x.visitFile(dirname, f, fulltextIndex)
}
}
}