diff options
author | Ian Lance Taylor <iant@golang.org> | 2021-01-21 18:21:35 -0800 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2021-01-22 06:35:01 +0000 |
commit | ec1b9452658dfa6ca865a9dd2711726ab71de99c (patch) | |
tree | 1193abd03cfd0d7f18212c8d55c973add7279ccb /doc | |
parent | 11def3d40b12292a30b305226cd4910b6c5bc14b (diff) | |
download | go-ec1b9452658dfa6ca865a9dd2711726ab71de99c.tar.gz go-ec1b9452658dfa6ca865a9dd2711726ab71de99c.zip |
doc/go1.16: mention path/filepath.WalkDir
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>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/go1.16.html | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/go1.16.html b/doc/go1.16.html index aa70ec8c82..b3166fbaf5 100644 --- a/doc/go1.16.html +++ b/doc/go1.16.html @@ -872,6 +872,21 @@ func TestFoo(t *testing.T) { <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 |