sourceignore

package
v0.25.3 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
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

func DefaultPatterns(domain []string) []gitignore.Pattern

DefaultPatterns returns a gitignore.Pattern slice with the default ExcludeExt, ExcludeCI, ExcludeExtra patterns.

func LoadIgnorePatterns

func LoadIgnorePatterns(dir string, domain []string) ([]gitignore.Pattern, error)

LoadIgnorePatterns recursively loads the IgnoreFile patterns found in the directory.

func NewDefaultMatcher

func NewDefaultMatcher(ps []gitignore.Pattern, domain []string) gitignore.Matcher

NewDefaultMatcher returns a gitignore.Matcher with the DefaultPatterns as lowest priority patterns.

func NewMatcher

func NewMatcher(ps []gitignore.Pattern) gitignore.Matcher

NewMatcher returns a gitignore.Matcher for the given gitignore.Pattern slice. It mainly exists to compliment the API.

func ReadIgnoreFile

func ReadIgnoreFile(path string, domain []string) ([]gitignore.Pattern, error)

ReadIgnoreFile attempts to read the file at the given path and returns the read patterns.

func ReadPatterns

func ReadPatterns(reader io.Reader, domain []string) []gitignore.Pattern

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

func VCSPatterns(domain []string) []gitignore.Pattern

VCSPatterns returns a gitignore.Pattern slice with ExcludeVCS patterns.

Types

This section is empty.

Jump to

Keyboard shortcuts

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