assertions

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2022 License: MPL-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Ascending added in v0.2.5

func Ascending[O constraints.Ordered](slice []O) (s string)

func AscendingFunc added in v0.2.5

func AscendingFunc[A any](slice []A, less func(a, b A) bool) (s string)

func AscendingLess added in v0.2.5

func AscendingLess[L interfaces.LessFunc[L]](slice []L) (s string)

func Between added in v0.4.0

func Between[O constraints.Ordered](lower, val, upper O) (s string)

func BetweenExclusive added in v0.4.0

func BetweenExclusive[O constraints.Ordered](lower, val, upper O) (s string)

func Caller

func Caller() string

func Contains

func Contains[C any](i C, c interfaces.ContainsFunc[C]) (s string)

func Descending added in v0.2.5

func Descending[O constraints.Ordered](slice []O) (s string)

func DescendingFunc added in v0.2.5

func DescendingFunc[A any](slice []A, less func(a, b A) bool) (s string)

func DescendingLess added in v0.2.5

func DescendingLess[L interfaces.LessFunc[L]](slice []L) (s string)

func DirExistsFS added in v0.4.0

func DirExistsFS(system fs.FS, directory string) (s string)

func DirNotExistsFS added in v0.4.0

func DirNotExistsFS(system fs.FS, directory string) (s string)

func Empty added in v0.4.0

func Empty(e interfaces.EmptyFunc) (s string)

func Eq

func Eq[A any](exp, val A) (s string)

func EqError

func EqError(err error, msg string) (s string)

func EqFunc

func EqFunc[A any](exp, val A, eq func(a, b A) bool) (s string)

func EqJSON

func EqJSON(exp, val string) (s string)

func EqOp added in v0.2.4

func EqOp[C comparable](exp, val C) (s string)

func EqSliceFunc

func EqSliceFunc[A any](exp, val []A, eq func(a, b A) bool) (s string)

func Equal added in v0.4.0

func Equal[E interfaces.EqualFunc[E]](exp, val E) (s string)

func Error

func Error(err error) (s string)

func ErrorContains added in v0.5.0

func ErrorContains(err error, sub string) (s string)

func ErrorIs

func ErrorIs(err error, target error) (s string)

func False

func False(condition bool) (s string)

func FileContainsFS added in v0.4.0

func FileContainsFS(system fs.FS, file, content string) (s string)

func FileExistsFS added in v0.4.0

func FileExistsFS(system fs.FS, file string) (s string)

func FileModeFS added in v0.4.0

func FileModeFS(system fs.FS, path string, permissions fs.FileMode) (s string)

func FileNotExistsFS added in v0.4.0

func FileNotExistsFS(system fs.FS, file string) (s string)

func FilePathValid added in v0.2.5

func FilePathValid(path string) (s string)

func Greater

func Greater[O constraints.Ordered](exp, val O) (s string)

func GreaterEq

func GreaterEq[O constraints.Ordered](exp, val O) (s string)

func InDelta

func InDelta[N interfaces.Number](a, b, delta N) (s string)

func InDeltaSlice

func InDeltaSlice[N interfaces.Number](a, b []N, delta N) (s string)

func Length added in v0.4.0

func Length(n int, length interfaces.LengthFunc) (s string)

func Less

func Less[O constraints.Ordered](exp, val O) (s string)

func LessEq

func LessEq[O constraints.Ordered](exp, val O) (s string)

func Lesser

func Lesser[L interfaces.LessFunc[L]](exp, val L) (s string)

func MapContainsKeys added in v0.2.5

func MapContainsKeys[M ~map[K]V, K comparable, V any](m M, keys []K) (s string)

func MapContainsValues added in v0.2.5

func MapContainsValues[M ~map[K]V, K comparable, V any](m M, vals []V) (s string)

func MapContainsValuesEqual added in v0.4.0

func MapContainsValuesEqual[M ~map[K]V, K comparable, V interfaces.EqualFunc[V]](m M, vals []V) (s string)

func MapContainsValuesFunc added in v0.2.5

func MapContainsValuesFunc[M ~map[K]V, K comparable, V any](m M, vals []V, eq func(V, V) bool) (s string)

func MapEmpty

func MapEmpty[M ~map[K]V, K comparable, V any](m M) (s string)

func MapEq

func MapEq[M1, M2 interfaces.Map[K, V], K comparable, V any](exp M1, val M2) (s string)

func MapEqFunc

func MapEqFunc[M1, M2 interfaces.Map[K, V], K comparable, V any](exp M1, val M2, eq func(V, V) bool) (s string)

func MapEqual added in v0.4.0

func MapEqual[M interfaces.MapEqualFunc[K, V], K comparable, V interfaces.EqualFunc[V]](exp, val M) (s string)

func MapLen

func MapLen[M ~map[K]V, K comparable, V any](n int, m M) (s string)

func MapNotContainsKeys added in v0.4.6

func MapNotContainsKeys[M ~map[K]V, K comparable, V any](m M, keys []K) (s string)

func MapNotContainsValues added in v0.4.6

func MapNotContainsValues[M ~map[K]V, K comparable, V any](m M, vals []V) (s string)

func MapNotContainsValuesEqual added in v0.4.6

func MapNotContainsValuesEqual[M ~map[K]V, K comparable, V interfaces.EqualFunc[V]](m M, vals []V) (s string)

func MapNotContainsValuesFunc added in v0.4.6

func MapNotContainsValuesFunc[M ~map[K]V, K comparable, V any](m M, vals []V, eq func(V, V) bool) (s string)

func MapNotEmpty added in v0.4.0

func MapNotEmpty[M ~map[K]V, K comparable, V any](m M) (s string)

func Negative added in v0.2.5

func Negative[N interfaces.Number](n N) (s string)

func Nil

func Nil(a any) (s string)

func NoError

func NoError(err error) (s string)

func NonNegative added in v0.4.0

func NonNegative[N interfaces.Number](n N) (s string)

func NonPositive added in v0.4.0

func NonPositive[N interfaces.Number](n N) (s string)

func NonZero added in v0.2.5

func NonZero[N interfaces.Number](n N) (s string)

func NotContains added in v0.4.0

func NotContains[C any](i C, c interfaces.ContainsFunc[C]) (s string)

func NotEmpty added in v0.4.0

func NotEmpty(e interfaces.EmptyFunc) (s string)

func NotEq

func NotEq[A any](exp, val A) (s string)

func NotEqFunc

func NotEqFunc[A any](exp, val A, eq func(a, b A) bool) (s string)

func NotEqOp added in v0.2.5

func NotEqOp[C comparable](exp, val C) (s string)

func NotEqual added in v0.4.0

func NotEqual[E interfaces.EqualFunc[E]](exp, val E) (s string)

func NotNil

func NotNil(a any) (s string)

func One added in v0.3.1

func One[N interfaces.Number](n N) (s string)

func Positive added in v0.2.5

func Positive[N interfaces.Number](n N) (s string)

func RegexMatch added in v0.2.5

func RegexMatch(re *regexp.Regexp, target string) (s string)

func RegexpCompiles added in v0.3.0

func RegexpCompiles(expr string) (s string)

func RegexpCompilesPOSIX added in v0.3.0

func RegexpCompilesPOSIX(expr string) (s string)

func Size added in v0.4.0

func Size(n int, size interfaces.SizeFunc) (s string)

func SliceContains added in v0.4.0

func SliceContains[A any](slice []A, item A) (s string)

func SliceContainsAll added in v0.4.0

func SliceContainsAll[A any](slice, items []A) (s string)

func SliceContainsEqual added in v0.4.0

func SliceContainsEqual[E interfaces.EqualFunc[E]](slice []E, item E) (s string)

func SliceContainsFunc added in v0.4.0

func SliceContainsFunc[A any](slice []A, item A, eq func(a, b A) bool) (s string)

func SliceContainsOp added in v0.4.0

func SliceContainsOp[C comparable](slice []C, item C) (s string)

func SliceContainsSubset added in v0.4.1

func SliceContainsSubset[A any](slice, items []A) (s string)

func SliceEmpty added in v0.4.0

func SliceEmpty[A any](slice []A) (s string)

func SliceEqual added in v0.4.0

func SliceEqual[E interfaces.EqualFunc[E]](exp, val []E) (s string)

func SliceLen added in v0.4.0

func SliceLen[A any](n int, slice []A) (s string)

func SliceNotContains added in v0.4.0

func SliceNotContains[A any](slice []A, item A) (s string)

func SliceNotEmpty added in v0.4.0

func SliceNotEmpty[A any](slice []A) (s string)

func StrContains added in v0.3.0

func StrContains(str, sub string) (s string)

func StrContainsAny added in v0.3.0

func StrContainsAny(str, chars string) (s string)

func StrContainsFields added in v0.3.0

func StrContainsFields(str string, fields []string) (s string)

func StrContainsFold added in v0.3.0

func StrContainsFold(str, sub string) (s string)

func StrCount added in v0.3.0

func StrCount(str, sub string, exp int) (s string)

func StrEqFold added in v0.3.0

func StrEqFold(exp, val string) (s string)

func StrHasPrefix added in v0.3.0

func StrHasPrefix(prefix, str string) (s string)

func StrHasSuffix added in v0.3.0

func StrHasSuffix(suffix, str string) (s string)

func StrNotContains added in v0.3.0

func StrNotContains(str, sub string) (s string)

func StrNotContainsAny added in v0.3.0

func StrNotContainsAny(str, chars string) (s string)

func StrNotContainsFold added in v0.3.0

func StrNotContainsFold(str, sub string) (s string)

func StrNotEqFold added in v0.3.0

func StrNotEqFold(exp, val string) (s string)

func StrNotHasPrefix added in v0.3.0

func StrNotHasPrefix(prefix, str string) (s string)

func StrNotHasSuffix added in v0.3.0

func StrNotHasSuffix(suffix, str string) (s string)

func True

func True(condition bool) (s string)

func UUIDv4 added in v0.3.1

func UUIDv4(id string) (s string)

func Unreachable added in v0.2.8

func Unreachable() (s string)

func Wait added in v0.5.0

func Wait(wc *wait.Constraint) (s string)

func Zero added in v0.2.5

func Zero[N interfaces.Number](n N) (s string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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