Back to

package strict

Latest Go to latest
Published: Jun 16, 2020 | License: Apache-2.0 | Module:


Package strict provides an implementation to match strings against a set of exact match string filters.


type FilterSet

type FilterSet struct {
	// contains filtered or unexported fields

FilterSet encapsulates a set of exact string match filters. FilterSet is exported for convenience, but has unexported fields and should be constructed through NewFilterSet.

regexpFilterSet satisfies the FilterSet interface from ""

func NewFilterSet

func NewFilterSet(filters []string) (*FilterSet, error)

NewFilterSet constructs a FilterSet of exact string matches.

func (*FilterSet) Matches

func (sfs *FilterSet) Matches(toMatch string) bool

Matches returns true if the given string matches any of the FitlerSet's filters.

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
f or F : Jump to identifier