Skip to content

Commit

Permalink
doc/go1.16: mention path/filepath.WalkDir
Browse files Browse the repository at this point in the history
For #40700
For #42027

Change-Id: Ifb73050dfdab21784fa52d758ad9c408e6489684
Reviewed-on: https://go-review.googlesource.com/c/go/+/285595
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
  • Loading branch information
ianlancetaylor committed Jan 22, 2021
1 parent 11def3d commit ec1b945
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions doc/go1.16.html
Original file line number Diff line number Diff line change
Expand Up @@ -872,6 +872,21 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>

<dl id="path/filepath"><dt><a href="/pkg/path/filepath/">path/filepath</a></dt>
<dd>
<p><!-- CL 267887 -->
The new function
<a href="/pkg/path/filepath/WalkDir"><code>WalkDir</code></a>
is similar to
<a href="/pkg/path/filepath/Walk"><code>Walk</code></a>,
but is typically more efficient.
The function passed to <code>WalkDir</code> receives a
<a href="/pkg/io/fs/#DirEntry"><code>fs.DirEntry</code></a>
instead of a
<a href="/pkg/io/fs/#FileInfo"><code>fs.FileInfo</code></a>.
(To clarify for those who recall the <code>Walk</code> function
as taking an <a href="/pkg/os/#FileInfo"><code>os.FileInfo</code></a>,
<code>os.FileInfo</code> is now an alias for <code>fs.FileInfo</code>.)
</p>

<p><!-- CL 264397, golang.org/issues/28614 -->
The <a href="/pkg/path/filepath#Match"><code>Match</code></a> and
<a href="/pkg/path/filepath#Glob"><code>Glob</code></a> functions now
Expand Down

0 comments on commit ec1b945

Please sign in to comment.