]> Cypherpunks repositories - gostls13.git/commitdiff
io/fs: fix reference to WalkFunc
authorRuss Cox <rsc@golang.org>
Mon, 9 Nov 2020 14:25:05 +0000 (09:25 -0500)
committerRuss Cox <rsc@golang.org>
Wed, 11 Nov 2020 14:29:34 +0000 (14:29 +0000)
The comment explains differences between WalkDirFunc and WalkFunc,
but when this code moved out of path/filepath, we forgot to change
the reference to be filepath.WalkFunc. Fix that.

(The text should not be deleted, because path/filepath does not
contain this type - WalkDirFunc - nor this text anymore.)

Pointed out by Carl Johnson on CL 243916 post-submit.

For #41190.

Change-Id: I44c64d0b7e60cd6d3694cfd6d0b95468ec4612fe
Reviewed-on: https://go-review.googlesource.com/c/go/+/268417
Trust: Russ Cox <rsc@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
src/io/fs/walk.go

index e50c1bb15cece930b8080283706bc797b6c00ce2..dfc73767bc6ad0173bb466718d8b8176a4d9c7fb 100644 (file)
@@ -9,7 +9,7 @@ import (
        "path"
 )
 
-// SkipDir is used as a return value from WalkFuncs to indicate that
+// SkipDir is used as a return value from WalkDirFuncs to indicate that
 // the directory named in the call is to be skipped. It is not returned
 // as an error by any function.
 var SkipDir = errors.New("skip this directory")
@@ -56,7 +56,7 @@ var SkipDir = errors.New("skip this directory")
 // after a failed ReadDir and reports the error from ReadDir.
 // (If ReadDir succeeds, there is no second call.)
 //
-// The differences between WalkDirFunc compared to WalkFunc are:
+// The differences between WalkDirFunc compared to filepath.WalkFunc are:
 //
 //   - The second argument has type fs.DirEntry instead of fs.FileInfo.
 //   - The function is called before reading a directory, to allow SkipDir