On Mon, Jan 25, 2021 at 12:17 AM
ben...@gmail.com <
ben...@gmail.com> wrote:
>
> Just a couple of comments about the release notes:
>
> 1) At
https://tip.golang.org/doc/go1.16#minor_library_changes under path/filepath, the links to WalkDir and Walk are broken -- I believe they should be #WalkDir and #Walk instead of /WalkDir and /Walk.
>
> 2) I think it'd be great if there was an explicit mention of the new fs.ReadDir (or os.ReadDir) function and fs.DirEntry type, either under the "File Systems" heading or under "os" module. The FS interface is great, but fs.ReadDir/os.ReadDir add a new system-level ability (using ReadDirent or readdir on Unix and FindFirst/FindNext on Windows) to more efficiently walk directory trees without so many system calls to stat. A related improvement is mentioned under path/filepath.WalkDir, but the actual system-level enhancement is provided by fs.ReadDir/os.ReadDir and fs.DirEntry. Perhaps something like this under the "os" module heading:
>
> The new _ReadDir_ function reads a directory and returns the entries as a slice of _DirEntry_ instances, which makes traversing a directory more efficient by avoiding an operating system "stat" call in many cases. The new (*File).ReadDir method also returns _DirEntry_ instances (not to be confused with the existing Readdir method, which returns FileInfo instances).
>
> 3) Scanning the "os" package docs for 1.16, it seems there are too many things listed as new in 1.16. For example,
https://tip.golang.org/pkg/os/#File.Readdir is listed as new in 1.16, when it's not.
Thanks. I believe that all of these issues are now addressed.