R=golang-dev, bradfitz, dsymonds, minux.ma, rsc
CC=golang-dev
https://golang.org/cl/
5700043
"strings"
)
+// Conventional name for directories containing test data.
+// Excluded from directory trees.
+//
+const testdataDirName = "testdata"
+
type Directory struct {
Depth int
Path string // includes Name
}
func (b *treeBuilder) newDirTree(fset *token.FileSet, path, name string, depth int) *Directory {
- if b.pathFilter != nil && !b.pathFilter(path) {
+ if b.pathFilter != nil && !b.pathFilter(path) || name == testdataDirName {
return nil
}