filter

package
v0.0.0-...-16fbdda Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2019 License: 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 And

type And struct {
	Filters []Filter
}

And is a filter that Matches when all of the filter Match.

func (And) Match

func (a And) Match(vars map[string]interface{}) bool

type Filter

type Filter interface {
	// Match returns true if the items in the map match the filter's criteria.
	Match(args map[string]interface{}) bool
}

func NewIfArgs

func NewIfArgs(list []string) (Filter, error)

NewIfArgs creates an ifArgs from a list of strings, each in the form "arg-name:value-pattern".

func NewUnlessArgs

func NewUnlessArgs(list []string) (Filter, error)

NewUnlessArgs creates a filter that matches the opposite of ifArgs.

Jump to

Keyboard shortcuts

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