walkutil

package
v0.82.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 2, 2026 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WalkDirParallel

func WalkDirParallel(opts *WalkDirParallelOptions) []error

WalkDirParallel walks a directory tree in parallel, processing files concurrently but directories sequentially to ensure proper traversal.

Types

type WalkDirParallelOptions

type WalkDirParallelOptions struct {
	RootDir string
	// If set to 0 or negative, it will default to 10
	MaxConcurrency int
	// Return true to skip the directory, false to process it
	SkipDirFunc func(path string, d fs.DirEntry) bool

	// ErrorHandler allows custom handling of errors during processing
	// If nil, errors will be collected and returned
	ErrorHandler func(path string, err error)

	// FileProcessor is the function to process each file
	FileProcessor func(path string) error
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL