ignore

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2017 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const BogieIgnore = ".bogieignore"

BogieIgnore default name of an ignorefile.

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 path matching rules.

Parse() and ParseFile() will construct and populate new Rules. Empty() will create an immutable empty ruleset.

func Init

func Init() *Rules

Empty builds an inital ruleset.

func (*Rules) Clone

func (r *Rules) Clone() *Rules

func (*Rules) Ignore

func (r *Rules) Ignore(path string, isDir bool) bool

Ignore evalutes 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.

func (*Rules) Len

func (r *Rules) Len() int

Len returns the number of patterns in this rule set.

func (*Rules) Parse

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

Parse parses a rules file

func (*Rules) ParseFile

func (r *Rules) ParseFile(filepath string) error

ParseFile parses a BogieIgnore file.

Jump to

Keyboard shortcuts

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