filepathfilter

package
v2.5.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2018 License: MIT Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Filter

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

func New

func New(include, exclude []string) *Filter

func NewFromPatterns

func NewFromPatterns(include, exclude []Pattern) *Filter

func (*Filter) Allows

func (f *Filter) Allows(filename string) bool

func (*Filter) Exclude

func (f *Filter) Exclude() []string

Exclude returns the result of calling String() on each Pattern in the exclude set of this *Filter.

func (*Filter) Include

func (f *Filter) Include() []string

Include returns the result of calling String() on each Pattern in the include set of this *Filter.

type Pattern

type Pattern interface {
	Match(filename string) bool
	// String returns a string representation (see: regular expressions) of
	// the underlying pattern used to match filenames against this Pattern.
	String() string
}

func NewPattern

func NewPattern(p string) Pattern

Jump to

Keyboard shortcuts

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