diff options
Diffstat (limited to 'src/pkg/go/parser')
| -rw-r--r-- | src/pkg/go/parser/interface.go | 4 | ||||
| -rw-r--r-- | src/pkg/go/parser/parser_test.go | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/pkg/go/parser/interface.go b/src/pkg/go/parser/interface.go index fcaa3dfdf..e1ddb37c3 100644 --- a/src/pkg/go/parser/interface.go +++ b/src/pkg/go/parser/interface.go @@ -173,14 +173,14 @@ func ParseFiles(filenames []string, scope *ast.Scope, mode uint) (map[string]*as // ParseDir calls ParseFile for the files in the directory specified by path and // returns a map of package name -> package AST with all the packages found. If -// filter != nil, only the files with os.Dir entries passing through the filter +// filter != nil, only the files with os.FileInfo entries passing through the filter // are considered. The mode bits are passed to ParseFile unchanged. // // If the directory couldn't be read, a nil map and the respective error are // returned. If a parse error occured, a non-nil but incomplete map and the // error are returned. // -func ParseDir(path string, filter func(*os.Dir) bool, mode uint) (map[string]*ast.Package, os.Error) { +func ParseDir(path string, filter func(*os.FileInfo) bool, mode uint) (map[string]*ast.Package, os.Error) { fd, err := os.Open(path, os.O_RDONLY, 0) if err != nil { return nil, err diff --git a/src/pkg/go/parser/parser_test.go b/src/pkg/go/parser/parser_test.go index f3b91a930..75ebd8cec 100644 --- a/src/pkg/go/parser/parser_test.go +++ b/src/pkg/go/parser/parser_test.go @@ -79,7 +79,7 @@ func nameFilter(filename string) bool { } -func dirFilter(d *os.Dir) bool { return nameFilter(d.Name) } +func dirFilter(f *os.FileInfo) bool { return nameFilter(f.Name) } func TestParse4(t *testing.T) { |
