Documentation ¶
Index ¶
- Variables
- func Preposterous(path string, fileIndex *index.FileIndex, preHook hooks.OpenInputFileHook, ...) (stat.Result, error)
- func WithFollowSymlinks(followSymlinks bool) func(*FileWalker)
- func WithFs(fs afero.Fs) func(*FileWalker)
- func WithRecursive(recursive bool) func(*FileWalker)
- func WithSuffixes(suffixes []string) func(*FileWalker)
- type FileWalker
- type StringSet
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrSkipFile = errors.New("skip file")
ErrSkipFile is returned by hooks to signal that the file should be skipped.
Functions ¶
func Preposterous ¶
func Preposterous(path string, fileIndex *index.FileIndex, preHook hooks.OpenInputFileHook, postHook hooks.CloseInputFileHook, fn func() stat.Result) (stat.Result, error)
Preposterous runs a function on a file, and handles open and close input file hooks.
func WithFollowSymlinks ¶
func WithFollowSymlinks(followSymlinks bool) func(*FileWalker)
func WithFs ¶
func WithFs(fs afero.Fs) func(*FileWalker)
func WithRecursive ¶
func WithRecursive(recursive bool) func(*FileWalker)
func WithSuffixes ¶
func WithSuffixes(suffixes []string) func(*FileWalker)
Types ¶
type FileWalker ¶
type FileWalker struct { Recursive bool FollowSymlinks bool Suffixes []string Fs afero.Fs // contains filtered or unexported fields }
func New ¶
func New(options ...func(*FileWalker)) *FileWalker
Click to show internal directories.
Click to hide internal directories.