Documentation
¶
Index ¶
- func Domain(base, path string) ([]string, error)
- func LoadRepoPatterns(repoDir string) (patterns []gitignorev5.Pattern, err error)
- func NewMatcher(p []gitignorev5.Pattern) gitignorev5.Matcher
- func ReadIgnoreFile(ignoreFilePath string, domain []string) (ps []gitignorev5.Pattern, err error)
- type Pattern
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadRepoPatterns ¶
func LoadRepoPatterns(repoDir string) (patterns []gitignorev5.Pattern, err error)
LoadRepoPatterns reads gitignore patterns recursively traversing through the directory structure. The result is in the ascending order of priority (last higher).
func NewMatcher ¶
func NewMatcher(p []gitignorev5.Pattern) gitignorev5.Matcher
NewMatcher constructs a new global matcher. Patterns must be given in the order of increasing priority. That is most generic settings files first, then the content of the repo .gitignore, then content of .gitignore down the path or the repo and then the content command line arguments.
func ReadIgnoreFile ¶
func ReadIgnoreFile(ignoreFilePath string, domain []string) (ps []gitignorev5.Pattern, err error)
ReadIgnoreFile reads a specific git ignore file.
Types ¶
type Pattern ¶
type Pattern gitignorev5.Pattern
Click to show internal directories.
Click to hide internal directories.