]> Cypherpunks repositories - gostls13.git/commitdiff
os: change Readdirnames doc to follow that of Readdir
authorIan Lance Taylor <iant@golang.org>
Tue, 30 Jul 2019 13:28:57 +0000 (06:28 -0700)
committerRob Pike <r@golang.org>
Fri, 2 Aug 2019 21:52:01 +0000 (21:52 +0000)
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>
src/os/dir.go

index 6c54456a21576bd633fdf4e88f490a673e263b0c..1d7ced8061c5d76223076c85f757284a7dd94728 100644 (file)
@@ -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