Documentation
¶
Index ¶
- type GitignoreMatcher
- func (gm *GitignoreMatcher) Build() error
- func (gm *GitignoreMatcher) FromFile(filename string) (*GitignoreMatcher, error)
- func (gm *GitignoreMatcher) FromPatterns(patterns []string) *GitignoreMatcher
- func (gm *GitignoreMatcher) FromReader(r io.Reader) (*GitignoreMatcher, error)
- func (gm *GitignoreMatcher) Matches(someFilePath string) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GitignoreMatcher ¶
type GitignoreMatcher struct {
// contains filtered or unexported fields
}
Represents a GitignoreMatcher.
func NewGitignoreMatcher ¶
func NewGitignoreMatcher() *GitignoreMatcher
Returns a pointer to the GitignoreMatcher with no patterns.
func (*GitignoreMatcher) Build ¶
func (gm *GitignoreMatcher) Build() error
Build must be called before using the GitignoreMatcher. It initializes the patternmatcher.PatternMatcher struct with the given patterns.
func (*GitignoreMatcher) FromFile ¶
func (gm *GitignoreMatcher) FromFile(filename string) (*GitignoreMatcher, error)
Adds the given patterns to the existing GitignoreMatcher by reading from the given file.
func (*GitignoreMatcher) FromPatterns ¶
func (gm *GitignoreMatcher) FromPatterns(patterns []string) *GitignoreMatcher
Adds the given patterns to the existing GitignoreMatcher.
func (*GitignoreMatcher) FromReader ¶
func (gm *GitignoreMatcher) FromReader(r io.Reader) (*GitignoreMatcher, error)
Adds the given patterns to the existing GitignoreMatcher by reading from the given reader.
Click to show internal directories.
Click to hide internal directories.