diff options
Diffstat (limited to 'libgo/go/os/dir_unix.go')
-rw-r--r-- | libgo/go/os/dir_unix.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libgo/go/os/dir_unix.go b/libgo/go/os/dir_unix.go index 52959339512..e59c1af2ea7 100644 --- a/libgo/go/os/dir_unix.go +++ b/libgo/go/os/dir_unix.go @@ -7,6 +7,7 @@ package os import ( + "io" "syscall" ) @@ -23,10 +24,10 @@ const ( // If n <= 0, Readdirnames returns all the names from the directory in // a single slice. In this case, if Readdirnames succeeds (reads all // the way to the end of the directory), it returns the slice and a -// nil os.Error. If it encounters an error before the end of the +// nil error. If it encounters an error before the end of the // directory, Readdirnames returns the names read until that point and // a non-nil error. -func (f *File) Readdirnames(n int) (names []string, err Error) { +func (f *File) Readdirnames(n int) (names []string, err error) { // If this file has no dirinfo, create one. if f.dirinfo == nil { f.dirinfo = new(dirInfo) @@ -63,7 +64,7 @@ func (f *File) Readdirnames(n int) (names []string, err Error) { n -= nc } if n >= 0 && len(names) == 0 { - return names, EOF + return names, io.EOF } return names, nil } |