Skip to content

Commit 27fd94e

Browse files
dolmengopherbot
authored andcommitted
internal/fastwalk: doc formatting fixes (including godoc links)
* add godoc links * fix minor typos Change-Id: Iea7727913c412ccad259d62e75325903327fdb9a Reviewed-on: https://go-review.googlesource.com/c/tools/+/506775 Reviewed-by: Bryan Mills <[email protected]> Run-TryBot: Heschi Kreinick <[email protected]> gopls-CI: kokoro <[email protected]> Reviewed-by: Heschi Kreinick <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Auto-Submit: Bryan Mills <[email protected]>
1 parent d362be0 commit 27fd94e

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

internal/fastwalk/fastwalk.go

+8-8
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5-
// Package fastwalk provides a faster version of filepath.Walk for file system
5+
// Package fastwalk provides a faster version of [filepath.Walk] for file system
66
// scanning tools.
77
package fastwalk
88

@@ -23,31 +23,31 @@ var ErrTraverseLink = errors.New("fastwalk: traverse symlink, assuming target is
2323
// Child directories will still be traversed.
2424
var ErrSkipFiles = errors.New("fastwalk: skip remaining files in directory")
2525

26-
// Walk is a faster implementation of filepath.Walk.
26+
// Walk is a faster implementation of [filepath.Walk].
2727
//
28-
// filepath.Walk's design necessarily calls os.Lstat on each file,
28+
// [filepath.Walk]'s design necessarily calls [os.Lstat] on each file,
2929
// even if the caller needs less info.
3030
// Many tools need only the type of each file.
3131
// On some platforms, this information is provided directly by the readdir
3232
// system call, avoiding the need to stat each file individually.
3333
// fastwalk_unix.go contains a fork of the syscall routines.
3434
//
35-
// See golang.org/issue/16399
35+
// See golang.org/issue/16399.
3636
//
3737
// Walk walks the file tree rooted at root, calling walkFn for
3838
// each file or directory in the tree, including root.
3939
//
40-
// If fastWalk returns filepath.SkipDir, the directory is skipped.
40+
// If Walk returns [filepath.SkipDir], the directory is skipped.
4141
//
42-
// Unlike filepath.Walk:
42+
// Unlike [filepath.Walk]:
4343
// - file stat calls must be done by the user.
4444
// The only provided metadata is the file type, which does not include
4545
// any permission bits.
4646
// - multiple goroutines stat the filesystem concurrently. The provided
4747
// walkFn must be safe for concurrent use.
48-
// - fastWalk can follow symlinks if walkFn returns the TraverseLink
48+
// - Walk can follow symlinks if walkFn returns the TraverseLink
4949
// sentinel error. It is the walkFn's responsibility to prevent
50-
// fastWalk from going into symlink cycles.
50+
// Walk from going into symlink cycles.
5151
func Walk(root string, walkFn func(path string, typ os.FileMode) error) error {
5252
// TODO(bradfitz): make numWorkers configurable? We used a
5353
// minimum of 4 to give the kernel more info about multiple

0 commit comments

Comments
 (0)