pattern

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2017 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CASE_SENSITIVE bitflag.Flag = 1 << iota
	USE_REAL_REGEX
)

Variables

This section is empty.

Functions

func BuildMatchList

func BuildMatchList(sourcePattern *regexp.Regexp, subject string) []string

func GlobToRegexString

func GlobToRegexString(glob string) string

func StrToAge

func StrToAge(t string, reference time.Time) (time.Time, error)

func StrToSize

func StrToSize(sizeString string) (int64, error)

Types

type BasePattern

type BasePattern struct {
	Fs      afero.Fs
	Path    string
	Pattern string
	// contains filtered or unexported fields
}

func NewBasePattern

func NewBasePattern(fs afero.Fs, patternString string) *BasePattern

func (*BasePattern) IsDir

func (p *BasePattern) IsDir() bool

func (*BasePattern) IsFile

func (p *BasePattern) IsFile() bool

type DestinationPattern

type DestinationPattern struct {
	BasePattern
}

func NewDestinationPattern

func NewDestinationPattern(fs afero.Fs, patternString string) *DestinationPattern

type SourcePattern

type SourcePattern struct {
	BasePattern
	// contains filtered or unexported fields
}

func NewSourcePattern

func NewSourcePattern(fs afero.Fs, patternString string, params ...bitflag.Flag) *SourcePattern

func (*SourcePattern) Compile

func (p *SourcePattern) Compile() (*regexp.Regexp, error)

Jump to

Keyboard shortcuts

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