os: use error, io.EOF

R=r
CC=golang-dev
https://golang.org/cl/5298073
This commit is contained in:
Russ Cox 2011-11-01 21:49:08 -04:00
parent c06cf03f0b
commit 08a073a180
30 changed files with 233 additions and 253 deletions

View file

@ -7,6 +7,7 @@
package os
import (
"io"
"syscall"
)
@ -26,7 +27,7 @@ const (
// nil os.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
}