1
0
mirror of https://github.com/golang/go synced 2024-11-23 07:40:04 -07:00

io/fs,path/filepath: fix typo in SkipAll/SkipDir doc

Also make the reference into a doc link.

Change-Id: Ib112307a65b65c8f963abf60aa92cb1942de940c
Reviewed-on: https://go-review.googlesource.com/c/go/+/554295
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This commit is contained in:
Roger Peppe 2024-01-05 12:47:56 +00:00 committed by roger peppe
parent b7c630dc3a
commit 821f94103b
2 changed files with 4 additions and 4 deletions

View File

@ -9,12 +9,12 @@ import (
"path"
)
// SkipDir is used as a return value from WalkDirFuncs to indicate that
// SkipDir is used as a return value from [WalkDirFunc] 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")
// SkipAll is used as a return value from WalkDirFuncs to indicate that
// SkipAll is used as a return value from [WalkDirFunc] to indicate that
// all remaining files and directories are to be skipped. It is not returned
// as an error by any function.
var SkipAll = errors.New("skip everything and stop the walk")

View File

@ -386,12 +386,12 @@ func Rel(basepath, targpath string) (string, error) {
return targ[t0:], nil
}
// SkipDir is used as a return value from WalkFuncs to indicate that
// SkipDir is used as a return value from [WalkFunc] 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 error = fs.SkipDir
// SkipAll is used as a return value from WalkFuncs to indicate that
// SkipAll is used as a return value from [WalkFunc] to indicate that
// all remaining files and directories are to be skipped. It is not returned
// as an error by any function.
var SkipAll error = fs.SkipAll