ignored

package
v0.0.0-...-11437de Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2016 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IgnoreRule

type IgnoreRule struct {
	HasStartAnchor bool           // true if the rule begin with /
	IsPattern      bool           // true if the rule contains *
	Pattern        *regexp.Regexp // the regexp pattern of the string rule
}

func (*IgnoreRule) String

func (p *IgnoreRule) String() string

type Ignored

type Ignored struct {
	Rules []IgnoreRule
}

func (*Ignored) Append

func (p *Ignored) Append(ruleString string) error

Append a rule to the Ignored instance. If the rule is starting with a #, it is not added, it returns nil. If the rule is empty, it is not added, it returns nil. If the rule cannot be computed to a regexp, it returns an error. When the rule was added, it returns nil.

func (*Ignored) ComputeDirectory

func (p *Ignored) ComputeDirectory(dirpath string) []string

func (*Ignored) Load

func (p *Ignored) Load(filepath string) error

func (*Ignored) Match

func (p *Ignored) Match(some string) bool

func (*Ignored) Parse

func (p *Ignored) Parse(content string) error

Jump to

Keyboard shortcuts

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