matcher

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Matcher

type Matcher struct {
	Includes []*regexp.Regexp
	Excludes []*regexp.Regexp
}

Matcher matches strings using regex

func (*Matcher) Matches

func (m *Matcher) Matches(text string) bool

Matches returns true if there are no includes or one of them matches and the text does not match an exclude

func (*Matcher) ToRegexs

func (m *Matcher) ToRegexs(texts []string) ([]*regexp.Regexp, error)

ToRegexs creates a slice of regex

Jump to

Keyboard shortcuts

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