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
}
Click to show internal directories.
Click to hide internal directories.