Documentation
¶
Overview ¶
Package collect provides functionality to collect file paths for processing.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IPathCollector ¶
type IPathCollector interface {
CollectPaths(done <-chan struct{}) <-chan *PathResult
}
IPathCollector provides an interface for PathCollector's exported methods.
type PathCollector ¶
type PathCollector struct {
BaseDir string
DefaultPaths []string
ManualPaths []string
Globs []string
Recursive bool
}
PathCollector gathers files for processing.
func NewPathCollector ¶
func NewPathCollector( baseDir string, defaultPaths []string, manualPaths []string, globs []string, recursive bool, ) (*PathCollector, error)
NewPathCollector returns a PathCollector after validating its fields.
func (*PathCollector) CollectPaths ¶
func (p *PathCollector) CollectPaths(done <-chan struct{}) <-chan *PathResult
CollectPaths gathers file paths specified by PathCollector. It removes duplicates and ensures that the file paths are within a subdirectory of the base directory.
type PathResult ¶
PathResult holds collected paths and errors that occurred while gathering them.
Click to show internal directories.
Click to hide internal directories.