diff options
author | Ian Lance Taylor <iant@golang.org> | 2019-07-30 06:28:57 -0700 |
---|---|---|
committer | Rob Pike <r@golang.org> | 2019-08-02 21:52:01 +0000 |
commit | fc821667dd73987d1e579a813b50e403f8ff3c22 (patch) | |
tree | 44e7b7b4cd32ef286b7f3d48e9e8a233ba58b899 | |
parent | d178c5888f06918e8dbd221f26c707e501a9fa98 (diff) | |
download | go-fc821667dd73987d1e579a813b50e403f8ff3c22.tar.gz go-fc821667dd73987d1e579a813b50e403f8ff3c22.zip |
os: change Readdirnames doc to follow that of Readdir
The two methods act the same, so make their documentation similar so
that people don't think they act differently.
Change-Id: If224692ef50870faf855d789380a614d1e724132
Reviewed-on: https://go-review.googlesource.com/c/go/+/188137
Reviewed-by: Rob Pike <r@golang.org>
-rw-r--r-- | src/os/dir.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/os/dir.go b/src/os/dir.go index 6c54456a21..1d7ced8061 100644 --- a/src/os/dir.go +++ b/src/os/dir.go @@ -26,7 +26,10 @@ func (f *File) Readdir(n int) ([]FileInfo, error) { return f.readdir(n) } -// Readdirnames reads and returns a slice of names from the directory f. +// Readdirnames reads the contents of the directory associated with file +// and returns a slice of up to n names of files in the directory, +// in directory order. Subsequent calls on the same file will yield +// further names. // // If n > 0, Readdirnames returns at most n names. In this case, if // Readdirnames returns an empty slice, it will return a non-nil error |