Commit b7db4fef authored by Andrew Gerrand's avatar Andrew Gerrand

godoc: ignore directories that begin with '.'

Fixes #2017.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4675047
parent 5b165823
......@@ -30,7 +30,7 @@ type Directory struct {
func isGoFile(fi FileInfo) bool {
name := fi.Name()
return fi.IsRegular() &&
!strings.HasPrefix(name, ".") && // ignore .files
len(name) > 0 && name[0] != '.' && // ignore .files
filepath.Ext(name) == ".go"
}
......@@ -43,7 +43,8 @@ func isPkgFile(fi FileInfo) bool {
func isPkgDir(fi FileInfo) bool {
name := fi.Name()
return fi.IsDirectory() && len(name) > 0 && name[0] != '_'
return fi.IsDirectory() && len(name) > 0 &&
name[0] != '_' && name[0] != '.' // ignore _files and .files
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment