summaryrefslogtreecommitdiff
path: root/src/pkg/go
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2010-04-09 11:36:40 -0700
committerRob Pike <r@golang.org>2010-04-09 11:36:40 -0700
commita7853ac6640a106110a419056c903254a79e88b2 (patch)
tree4b1508a2b14e9ad765f75eb3f41c7a4981b52b90 /src/pkg/go
parentfee2616bb9c2e118d0a44e71f1ed24b6d701e131 (diff)
downloadgolang-a7853ac6640a106110a419056c903254a79e88b2.tar.gz
rename os.Dir to os.FileInfo
R=rsc CC=golang-dev http://codereview.appspot.com/902042
Diffstat (limited to 'src/pkg/go')
-rw-r--r--src/pkg/go/parser/interface.go4
-rw-r--r--src/pkg/go/parser/parser_test.go2
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) {