comparator

package
v0.15.10-rc.1 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoMatch  = fmt.Errorf("no match")
	ErrNotFound = fmt.Errorf("not found")
)

Functions

This section is empty.

Types

type Comparator

type Comparator interface {
	Compare(expected, actual string) error
	fmt.Stringer
}
var Contains Comparator = contains{}

Contains

var EndsWith Comparator = endsWith{}

EndsWith

var Eq Comparator = eq{}

Eq

var Gt Comparator = gt{}

Gt

var Gte Comparator = gte{}

Gte

var Lt Comparator = lt{}

Lt

var Lte Comparator = lte{}

Lte

var Neq Comparator = neq{}

Neq

var NotContains Comparator = notContains{}

Not contains

var StartsWith Comparator = startsWith{}

StartsWith

type Registry

type Registry interface {
	Get(string) (Comparator, error)
}

func DefaultRegistry

func DefaultRegistry() Registry

func NewRegistry

func NewRegistry(comps ...Comparator) (Registry, error)

Jump to

Keyboard shortcuts

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