ignore

package
v2.0.2+incompatible Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GlobMatch

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

GlobMatch handle glob matching

func NewBaseGlobMatch

func NewBaseGlobMatch(arg string, truth bool) (*GlobMatch, error)

NewBaseGlobMatch compiles a new matcher. Arg true should be set to false if the output is inverted.

func NewGlobMatch

func NewGlobMatch(arg []byte) (*GlobMatch, error)

NewGlobMatch creates a new GlobMatch instance or error

func NewPathGlobMatch

func NewPathGlobMatch(arg string, truth bool) (*GlobMatch, error)

NewPathGlobMatch compiles a new matcher. Arg true should be set to false if the output is inverted.

func (*GlobMatch) MarshalText

func (g *GlobMatch) MarshalText() ([]byte, error)

MarshalText is really a debug function

func (*GlobMatch) Match

func (g *GlobMatch) Match(file string) bool

Match satisfies the Matcher interface

func (*GlobMatch) True

func (g *GlobMatch) True() bool

True returns true if this should be evaluated normally ("true is true")

and false if the result should be inverted ("false is true")

type Matcher

type Matcher interface {
	Match(string) bool
	True() bool
	MarshalText() ([]byte, error)
}

Matcher defines an interface for filematchers

func Parse

func Parse(src []byte) (Matcher, error)

Parse reads in a gitignore file and returns a Matcher

type MultiMatch

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

MultiMatch has matching on a list of matchers

func NewMultiMatch

func NewMultiMatch(matchers []Matcher) *MultiMatch

NewMultiMatch creates a new MultiMatch instance

func (*MultiMatch) MarshalText

func (mm *MultiMatch) MarshalText() ([]byte, error)

MarshalText satifies the ?? interface

func (*MultiMatch) Match

func (mm *MultiMatch) Match(arg string) bool

Match satifies the Matcher iterface

func (*MultiMatch) True

func (mm *MultiMatch) True() bool

True returns true

Jump to

Keyboard shortcuts

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