e2ematcher

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MapContainsMatchers

func MapContainsMatchers[K comparable, V any](m map[K]V) map[string]any

func Struct

func Struct(actual any, matchers map[string]any) (retErr error)

Types

type Matcher

type Matcher interface {
	Match(val any) error
}

func And

func And(ms ...Matcher) Matcher

func Any

func Any(ms ...Matcher) Matcher

func DeepEqual

func DeepEqual(v any) Matcher

func DeepEqualIgnorePtr added in v1.8.0

func DeepEqualIgnorePtr(v any) Matcher

func ValidatorEq

func ValidatorEq(v any) Matcher

func ValidatorNe

func ValidatorNe(v any) Matcher

type MatcherFunc

type MatcherFunc func(val any) error

func (MatcherFunc) Match

func (f MatcherFunc) Match(val any) error

type ValidatorMatcher

type ValidatorMatcher string

func (ValidatorMatcher) Match

func (m ValidatorMatcher) Match(val any) error

Jump to

Keyboard shortcuts

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