ignore

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: Apache-2.0 Imports: 9 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Rules

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

rules is a collection of pattern matching rules.

func Empty

func Empty(ignoreFile string) *Rules

Empty builds an empty ruleset.

func Parse

func Parse(file io.Reader) (*Rules, error)

Parse parses a rules file and return empty rules

func (*Rules) Ignore

func (r *Rules) Ignore(path string, d fs.DirEntry) bool

Ignore evaluates the file at the given path, and returns true if it should be ignored.

Ignore evaluates path against the rules in order. Evaluation stops when a match is found. Matching a negative rule will stop evaluation.

Jump to

Keyboard shortcuts

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