mirror of
https://github.com/golang/go
synced 2024-11-23 18:40:03 -07:00
io/ioutil: clarify docs for ReadDir sort order.
Change-Id: I6a4ab5a1f44b54cfa81a650055460587ceefb2fc Reviewed-on: https://go-review.googlesource.com/14144 Reviewed-by: Andrew Gerrand <adg@golang.org>
This commit is contained in:
parent
e424d59680
commit
8ceaefb74a
@ -96,7 +96,7 @@ func (f byName) Less(i, j int) bool { return f[i].Name() < f[j].Name() }
|
||||
func (f byName) Swap(i, j int) { f[i], f[j] = f[j], f[i] }
|
||||
|
||||
// ReadDir reads the directory named by dirname and returns
|
||||
// a list of sorted directory entries.
|
||||
// a list of directory entries sorted by filename.
|
||||
func ReadDir(dirname string) ([]os.FileInfo, error) {
|
||||
f, err := os.Open(dirname)
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user