Documentation ¶
Overview ¶
Package matcher provides a utility for matching files based on glob patterns, with support for excluding directories, hidden files and folders, and binary files.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Globber ¶
type Globber struct { // Exclude is a list of patterns that are used to exclude files. Exclude []string // Logger is a logger for debug messages (mainly). Logger Logger // contains filtered or unexported fields }
Globber is a file matcher that compiles a list of files matching a given pattern, while excluding files based on provided exclude patterns and options.
func New ¶
New creates a Globber with default settings, including:
- Excluding the executable itself
- Excluding all kinds of executables
- Excluding specific known directories
- Excluding hidden folders & files if the 'hidden' parameter is set to false
The 'exclude' parameter allows specifying additional exclude patterns, and the 'logger' parameter sets the logger for debug messages.
Click to show internal directories.
Click to hide internal directories.