Documentation ¶
Index ¶
- Constants
- func DefaultPatterns(domain []string) []gitignore.Pattern
- func LoadIgnorePatterns(dir string, domain []string) ([]gitignore.Pattern, error)
- func NewDefaultMatcher(ps []gitignore.Pattern, domain []string) gitignore.Matcher
- func NewMatcher(ps []gitignore.Pattern) gitignore.Matcher
- func ReadIgnoreFile(path string, domain []string) ([]gitignore.Pattern, error)
- func ReadPatterns(reader io.Reader, domain []string) []gitignore.Pattern
- func VCSPatterns(domain []string) []gitignore.Pattern
Constants ¶
const ( IgnoreFile = ".sourceignore" ExcludeVCS = ".git/,.gitignore,.gitmodules,.gitattributes" ExcludeExt = "*.jpg,*.jpeg,*.gif,*.png,*.wmv,*.flv,*.tar.gz,*.zip" ExcludeCI = "" /* 127-byte string literal not displayed */ ExcludeExtra = "**/.goreleaser.yml,**/.sops.yaml,**/.flux.yaml" )
Variables ¶
This section is empty.
Functions ¶
func DefaultPatterns ¶
DefaultPatterns returns a gitignore.Pattern slice with the default ExcludeExt, ExcludeCI, ExcludeExtra patterns.
func LoadIgnorePatterns ¶
LoadIgnorePatterns recursively loads the the IgnoreFile patterns found in the directory.
func NewDefaultMatcher ¶
NewDefaultMatcher returns a gitignore.Matcher with the DefaultPatterns as lowest priority patterns.
func NewMatcher ¶
NewMatcher returns a gitignore.Matcher for the given gitignore.Pattern slice. It mainly exists to compliment the API.
func ReadIgnoreFile ¶
ReadIgnoreFile attempts to read the file at the given path and returns the read patterns.
func ReadPatterns ¶
ReadPatterns collects ignore patterns from the given reader and returns them as a gitignore.Pattern slice. If a domain is supplied, this is used as the scope of the read patterns.
func VCSPatterns ¶
VCSPatterns returns a gitignore.Pattern slice with ExcludeVCS patterns.
Types ¶
This section is empty.