]> Cypherpunks repositories - gostls13.git/commit
fs: clarify documentation for ReadDir method
authorMatthew Burton <13mtfb@gmail.com>
Sat, 5 Apr 2025 20:56:42 +0000 (16:56 -0400)
committerGopher Robot <gobot@golang.org>
Sat, 19 Apr 2025 23:07:50 +0000 (16:07 -0700)
commitad0434200c4b17c339852c8c0ec0c0212f8563d9
treebf637e3d0aa1abe944d3c2ae81e8fac763a87c5b
parenta4d0269a4f74e8a66ee7487491857e1a1c582231
fs: clarify documentation for ReadDir method

The fs.ReadDir method behaves the same way as
os.ReadDir, in that when n <= 0, ReadDir returns
all DirEntry values remaining in the dictionary.

Update the comment to reflect that only remaining
DirEntry values are returned (not all entries),
for subsequent calls.

Fixes #69301

Change-Id: I41ef7ef1c8e3fe7d64586f5297512697dc60dd40
Reviewed-on: https://go-review.googlesource.com/c/go/+/663215
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Sean Liao <sean@liao.dev>
Auto-Submit: Sean Liao <sean@liao.dev>
Reviewed-by: Jorropo <jorropo.pgm@gmail.com>
Reviewed-by: David Chase <drchase@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/io/fs/fs.go