ignore

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2020 License: MIT Imports: 10 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ignore

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

Ignore is a gitignore-style object to ignore files/directories

func NewIgnore

func NewIgnore(lines []string, pathsForGitIgnores []string) *Ignore

NewIgnore produces an Ignore object, with compiled lines from .gitignore and DefaultIgnores which you can match files against

func (*Ignore) AddIgnoreFiles added in v0.1.6

func (i *Ignore) AddIgnoreFiles(paths []string, ignoreNames ...string)

AddIgnoreFiles walks each path provided in search of any files that match ignoreName and add the contents of those files to the gitignore matcher NOTE: this is very costly in large directories and should be used with caution

func (*Ignore) Match

func (i *Ignore) Match(f string) bool

Match returns true if the provided file matches any of the defined ignores

Jump to

Keyboard shortcuts

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