gitignore

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadPatterns

func ReadPatterns(fs afero.Fs, path []string) ([]gitignore.Pattern, error)

ReadPatterns reads gitignore patterns recursively traversing through the directory structure. The result is in the ascending order of priority (last higher).

Types

type Matcher

type Matcher interface {
	Match(path string, isDir bool) (bool, error)
}

func NewMatcher

func NewMatcher(matcher gitignore.Matcher) Matcher

type MatcherFactory

type MatcherFactory interface {
	NewMatcher(fs afero.Fs) (Matcher, error)
}

func NewMatcherFactory

func NewMatcherFactory() MatcherFactory

type MatcherFactoryImpl

type MatcherFactoryImpl struct{}

func (MatcherFactoryImpl) NewMatcher

func (mf MatcherFactoryImpl) NewMatcher(fs afero.Fs) (Matcher, error)

type MatcherImpl

type MatcherImpl struct {
	// contains filtered or unexported fields
}

func (MatcherImpl) Match

func (m MatcherImpl) Match(path string, isDir bool) (bool, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL