aboutsummaryrefslogtreecommitdiff
path: root/src/path/filepath/export_test.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2020-07-19 01:31:05 -0400
committerRuss Cox <rsc@golang.org>2020-11-06 19:42:05 +0000
commit362d25f2c82980860cb4eb5bfd0648116504788d (patch)
tree3ea587edcceacfa225e767cddf6dd59dad06fcc9 /src/path/filepath/export_test.go
parentd21af00dd22d478d0026797c91961168ba83aff9 (diff)
downloadgo-362d25f2c82980860cb4eb5bfd0648116504788d.tar.xz
io/fs: add WalkDir
This commit is a copy of filepath.WalkDir adapted to use fs.FS instead of the native OS file system. It is the last implementation piece of the io/fs proposal. The original io/fs proposal was to adopt filepath.Walk, but we have since introduced the more efficient filepath.WalkDir (#42027), so this CL adopts that more efficient option instead. (The changes in path/filepath bring the two copies more in line with each other. The main change is unembedding the field in statDirEntry, so that the fs.DirEntry passed to the WalkDirFunc for the root of the tree does not have any extra methods.) For #41190. Change-Id: I9359dfcc110338c0ec64535f22cafb38d0b613a6 Reviewed-on: https://go-review.googlesource.com/c/go/+/243916 Trust: Russ Cox <rsc@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Rob Pike <r@golang.org>
Diffstat (limited to 'src/path/filepath/export_test.go')
-rw-r--r--src/path/filepath/export_test.go2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/path/filepath/export_test.go b/src/path/filepath/export_test.go
index e7ad7dd01a..0cf9e3bca1 100644
--- a/src/path/filepath/export_test.go
+++ b/src/path/filepath/export_test.go
@@ -5,5 +5,3 @@
package filepath
var LstatP = &lstat
-
-type DirEntryFromInfo = dirEntryFromInfo