Documentation
¶
Index ¶
Constants ¶
View Source
const ( FormatJSON = "json" FormatText = "text" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FormatConfig ¶
type FormatConfig struct {
Output string `koanf:"output" short:"o" description:"output format, one of 'json' or 'text'"`
}
func NewFormatConfig ¶
func NewFormatConfig() FormatConfig
func (*FormatConfig) Validate ¶
func (cfg *FormatConfig) Validate() error
type WalkConfig ¶
type WalkConfig struct {
SearchDir string `koanf:"search.dir" short:"d" description:"directory to search for files recursively"`
FileRegex string `koanf:"file.regex" short:"f" description:"regex to match files in the search dir"`
FileRegexp *regexp.Regexp `koanf:"-"`
ArchiveRegex string `koanf:"archive.regex" short:"a" description:"regex to match archive files in the search dir"`
ArchiveRegexp *regexp.Regexp `koanf:"-"`
IncludeArchives bool `koanf:"include.archive" short:"A" description:"search inside archive files"`
Concurrency int `koanf:"concurrency" short:"t" description:"number of concurrent workers to use"`
}
func NewWalkConfig ¶
func NewWalkConfig() WalkConfig
func (*WalkConfig) ToFSWalkConfig ¶
func (cfg *WalkConfig) ToFSWalkConfig() fswalk.WalkConfig
func (*WalkConfig) Validate ¶
func (cfg *WalkConfig) Validate() error
Click to show internal directories.
Click to hide internal directories.