Version: v0.1.5 Latest Latest

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

Go to latest
Published: Sep 14, 2021 License: MIT Imports: 4 Imported by: 0




This section is empty.


This section is empty.


This section is empty.


type Chain

type Chain interface {
	Add(fns ...Function) Chain
	// contains filtered or unexported methods

type ChainBuilder

type ChainBuilder = func(actual interface{}, chain Chain) Chain

type Function

type Function func() MatchResult

func FailIfAnyIsNil

func FailIfAnyIsNil(format string, actual, given interface{}) Function

func FailIfIsNil

func FailIfIsNil(name string, value interface{}) Function

func FailIfNotRestrictedType added in v0.1.3

func FailIfNotRestrictedType(name string, value interface{}, kinds *internal.RestrictedToKinds) Function

func FailIfNotSameType

func FailIfNotSameType(actual, given interface{}) Function

func MatchIfAllAreNil

func MatchIfAllAreNil(actual, given interface{}) Function

type MatchResult

type MatchResult struct {
	Matched bool
	Cause   string
	// contains filtered or unexported fields

func Failed

func Failed(cause string) MatchResult

func Matched

func Matched() MatchResult

func Next

func Next() MatchResult

func (*MatchResult) String

func (c *MatchResult) String() string

type Matcher

type Matcher interface {
	Matches(actual interface{}) bool

	Cause() string

func LoopAndApply

func LoopAndApply(matcherFn func(elem interface{}) Matcher, given ...interface{}) Matcher

applies a matcherFn to every element of given

func New

func New(chainBuilder ChainBuilder) Matcher

Jump to

Keyboard shortcuts

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