ignore

package
v0.18.5 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRootGitDir

func GetRootGitDir(workingDir string) (filesystem billy.Filesystem, err error)

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(filesystem billy.Filesystem, lines []string) (ignore *Ignore, err error)

NewIgnore produces an Ignore object, with compiled lines from defaultIgnoreFiles which you can match files against

func (*Ignore) Match

func (i *Ignore) Match(f string, isDir bool) 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