Documentation ¶
Index ¶
- func Ascending[O constraints.Ordered](slice []O) (s string)
- func AscendingCmp[A any](slice []A, compare func(a, b A) int) (s string)
- func AscendingFunc[A any](slice []A, less func(a, b A) bool) (s string)
- func AscendingLess[L interfaces.LessFunc[L]](slice []L) (s string)
- func Between[O constraints.Ordered](lower, val, upper O) (s string)
- func BetweenExclusive[O constraints.Ordered](lower, val, upper O) (s string)
- func Caller() string
- func Close(c io.Closer) (s string)
- func Contains[C any](i C, c interfaces.ContainsFunc[C]) (s string)
- func ContainsSubset[C any](elements []C, container interfaces.ContainsFunc[C]) (s string)
- func Descending[O constraints.Ordered](slice []O) (s string)
- func DescendingCmp[A any](slice []A, compare func(a, b A) int) (s string)
- func DescendingFunc[A any](slice []A, less func(a, b A) bool) (s string)
- func DescendingLess[L interfaces.LessFunc[L]](slice []L) (s string)
- func DirExists(directory string) (s string)
- func DirExistsFS(system fs.FS, directory string) (s string)
- func DirMode(path string, permissions fs.FileMode) (s string)
- func DirModeFS(system fs.FS, path string, permissions fs.FileMode) (s string)
- func DirNotExists(directory string) (s string)
- func DirNotExistsFS(system fs.FS, directory string) (s string)
- func Empty(e interfaces.EmptyFunc) (s string)
- func Eq[A any](exp, val A, opts ...cmp.Option) (s string)
- func EqError(err error, msg string) (s string)
- func EqFunc[A any](exp, val A, eq func(a, b A) bool) (s string)
- func EqJSON(exp, val string) (s string)
- func EqOp[C comparable](exp, val C) (s string)
- func EqSliceFunc[A, B any](exp []B, val []A, eq func(a A, b B) bool) (s string)
- func Equal[E interfaces.EqualFunc[E]](exp, val E) (s string)
- func Error(err error) (s string)
- func ErrorAs[E error, Target *E](err error, target Target) (s string)
- func ErrorContains(err error, sub string) (s string)
- func ErrorIs(err error, target error) (s string)
- func False(condition bool) (s string)
- func FileContains(file, content string) (s string)
- func FileContainsFS(system fs.FS, file, content string) (s string)
- func FileExists(file string) (s string)
- func FileExistsFS(system fs.FS, file string) (s string)
- func FileMode(path string, permissions fs.FileMode) (s string)
- func FileModeFS(system fs.FS, path string, permissions fs.FileMode) (s string)
- func FileNotExists(file string) (s string)
- func FileNotExistsFS(system fs.FS, file string) (s string)
- func FilePathValid(path string) (s string)
- func Greater[O constraints.Ordered](exp, val O) (s string)
- func GreaterEq[O constraints.Ordered](exp, val O) (s string)
- func InDelta[N interfaces.Number](a, b, delta N) (s string)
- func InDeltaSlice[N interfaces.Number](a, b []N, delta N) (s string)
- func Length(n int, length interfaces.LengthFunc) (s string)
- func Less[O constraints.Ordered](exp, val O) (s string)
- func LessEq[O constraints.Ordered](exp, val O) (s string)
- func Lesser[L interfaces.LessFunc[L]](exp, val L) (s string)
- func MapContainsKey[M ~map[K]V, K comparable, V any](m M, key K) (s string)
- func MapContainsKeys[M ~map[K]V, K comparable, V any](m M, keys []K) (s string)
- func MapContainsValue[M ~map[K]V, K comparable, V any](m M, val V, opts cmp.Options) (s string)
- func MapContainsValueEqual[M ~map[K]V, K comparable, V interfaces.EqualFunc[V]](m M, val V) (s string)
- func MapContainsValueFunc[M ~map[K]V, K comparable, V any](m M, val V, eq func(V, V) bool) (s string)
- func MapContainsValues[M ~map[K]V, K comparable, V any](m M, vals []V, opts cmp.Options) (s string)
- func MapContainsValuesEqual[M ~map[K]V, K comparable, V interfaces.EqualFunc[V]](m M, vals []V) (s string)
- func MapContainsValuesFunc[M ~map[K]V, K comparable, V any](m M, vals []V, eq func(V, V) bool) (s string)
- func MapEmpty[M ~map[K]V, K comparable, V any](m M) (s string)
- func MapEq[M1, M2 interfaces.Map[K, V], K comparable, V any](exp M1, val M2, opts cmp.Options) (s string)
- func MapEqFunc[M1, M2 interfaces.Map[K, V], K comparable, V any](exp M1, val M2, eq func(V, V) bool) (s string)
- func MapEqOp[M interfaces.Map[K, V], K, V comparable](exp, val M) (s string)
- func MapEqual[M interfaces.MapEqualFunc[K, V], K comparable, V interfaces.EqualFunc[V]](exp, val M) (s string)
- func MapLen[M ~map[K]V, K comparable, V any](n int, m M) (s string)
- func MapNotContainsKey[M ~map[K]V, K comparable, V any](m M, key K) (s string)
- func MapNotContainsKeys[M ~map[K]V, K comparable, V any](m M, keys []K) (s string)
- func MapNotContainsValue[M ~map[K]V, K comparable, V any](m M, val V, opts cmp.Options) (s string)
- func MapNotContainsValueEqual[M ~map[K]V, K comparable, V interfaces.EqualFunc[V]](m M, val V) (s string)
- func MapNotContainsValueFunc[M ~map[K]V, K comparable, V any](m M, val V, eq func(V, V) bool) (s string)
- func MapNotContainsValues[M ~map[K]V, K comparable, V any](m M, vals []V, opts cmp.Options) (s string)
- func MapNotContainsValuesEqual[M ~map[K]V, K comparable, V interfaces.EqualFunc[V]](m M, vals []V) (s string)
- func MapNotContainsValuesFunc[M ~map[K]V, K comparable, V any](m M, vals []V, eq func(V, V) bool) (s string)
- func MapNotEmpty[M ~map[K]V, K comparable, V any](m M) (s string)
- func Max[A any, C interfaces.MaxFunc[A]](expect A, collection C, opts ...cmp.Option) (s string)
- func Min[A any, C interfaces.MinFunc[A]](expect A, collection C, opts ...cmp.Option) (s string)
- func Negative[N interfaces.Number](value N) (s string)
- func Nil(a any) (s string)
- func NoError(err error) (s string)
- func NonNegative[N interfaces.Number](value N) (s string)
- func NonPositive[N interfaces.Number](value N) (s string)
- func NonZero[N interfaces.Number](value N) (s string)
- func NotContains[C any](i C, c interfaces.ContainsFunc[C]) (s string)
- func NotEmpty(e interfaces.EmptyFunc) (s string)
- func NotEq[A any](exp, val A, opts ...cmp.Option) (s string)
- func NotEqFunc[A any](exp, val A, eq func(a, b A) bool) (s string)
- func NotEqOp[C comparable](exp, val C) (s string)
- func NotEqual[E interfaces.EqualFunc[E]](exp, val E) (s string)
- func NotNil(a any) (s string)
- func One[N interfaces.Number](value N) (s string)
- func Positive[N interfaces.Number](value N) (s string)
- func RegexMatch(re *regexp.Regexp, target string) (s string)
- func RegexpCompiles(expr string) (s string)
- func RegexpCompilesPOSIX(expr string) (s string)
- func Size(n int, size interfaces.SizeFunc) (s string)
- func SliceContains[A any](slice []A, item A, opts ...cmp.Option) (s string)
- func SliceContainsAll[A any](slice, items []A, opts ...cmp.Option) (s string)
- func SliceContainsAllEqual[E interfaces.EqualFunc[E]](slice, items []E) (s string)
- func SliceContainsAllFunc[A, B any](slice []A, items []B, eq func(a A, b B) bool) (s string)
- func SliceContainsAllOp[C comparable](slice, items []C) (s string)
- func SliceContainsEqual[E interfaces.EqualFunc[E]](slice []E, item E) (s string)
- func SliceContainsFunc[A, B any](slice []A, item B, eq func(a A, b B) bool) (s string)
- func SliceContainsOp[C comparable](slice []C, item C) (s string)
- func SliceContainsSubset[A any](slice, items []A, opts ...cmp.Option) (s string)
- func SliceContainsSubsetEqual[E interfaces.EqualFunc[E]](slice, items []E) (s string)
- func SliceContainsSubsetFunc[A, B any](slice []A, items []B, eq func(a A, b B) bool) (s string)
- func SliceContainsSubsetOp[C comparable](slice, items []C) (s string)
- func SliceEmpty[A any](slice []A) (s string)
- func SliceEqOp[A comparable, S ~[]A](exp, val S) (s string)
- func SliceEqual[E interfaces.EqualFunc[E]](exp, val []E) (s string)
- func SliceLen[A any](n int, slice []A) (s string)
- func SliceNotContains[A any](slice []A, item A, opts ...cmp.Option) (s string)
- func SliceNotContainsFunc[A, B any](slice []A, item B, eq func(a A, b B) bool) (s string)
- func SliceNotEmpty[A any](slice []A) (s string)
- func StrContains(str, sub string) (s string)
- func StrContainsAny(str, chars string) (s string)
- func StrContainsFields(str string, fields []string) (s string)
- func StrContainsFold(str, sub string) (s string)
- func StrCount(str, sub string, exp int) (s string)
- func StrEqFold(exp, val string) (s string)
- func StrHasPrefix(prefix, str string) (s string)
- func StrHasSuffix(suffix, str string) (s string)
- func StrNotContains(str, sub string) (s string)
- func StrNotContainsAny(str, chars string) (s string)
- func StrNotContainsFold(str, sub string) (s string)
- func StrNotEqFold(exp, val string) (s string)
- func StrNotHasPrefix(prefix, str string) (s string)
- func StrNotHasSuffix(suffix, str string) (s string)
- func StructEqual[E interfaces.CopyEqual[E]](original E, tweaks []Tweak[E]) (s string)
- func True(condition bool) (s string)
- func UUIDv4(id string) (s string)
- func Unreachable() (s string)
- func ValidJSON(input string) (s string)
- func ValidJSONBytes(input []byte) (s string)
- func Wait(wc *wait.Constraint) (s string)
- func Zero[N interfaces.Number](value N) (s string)
- type Tweak
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 AscendingCmp ¶ added in v0.6.3
func AscendingFunc ¶ added in v0.2.5
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 Contains ¶
func Contains[C any](i C, c interfaces.ContainsFunc[C]) (s string)
func ContainsSubset ¶ added in v0.6.1
func ContainsSubset[C any](elements []C, container interfaces.ContainsFunc[C]) (s string)
func Descending ¶ added in v0.2.5
func Descending[O constraints.Ordered](slice []O) (s string)
func DescendingCmp ¶ added in v0.6.3
func DescendingFunc ¶ added in v0.2.5
func DescendingLess ¶ added in v0.2.5
func DescendingLess[L interfaces.LessFunc[L]](slice []L) (s string)
func DirNotExists ¶ added in v0.2.5
func DirNotExistsFS ¶ added in v0.4.0
func Empty ¶ added in v0.4.0
func Empty(e interfaces.EmptyFunc) (s string)
func EqOp ¶ added in v0.2.4
func EqOp[C comparable](exp, val C) (s string)
func EqSliceFunc ¶
func Equal ¶ added in v0.4.0
func Equal[E interfaces.EqualFunc[E]](exp, val E) (s string)
func ErrorContains ¶ added in v0.5.0
func FileContains ¶ added in v0.2.5
func FileContainsFS ¶ added in v0.4.0
func FileExists ¶ added in v0.2.5
func FileModeFS ¶ added in v0.4.0
func FileNotExists ¶ added in v0.2.5
func FilePathValid ¶ added in v0.2.5
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 MapContainsKey ¶ added in v0.6.0
func MapContainsKey[M ~map[K]V, K comparable, V any](m M, key K) (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 MapContainsValue ¶ added in v1.7.2
func MapContainsValue[M ~map[K]V, K comparable, V any](m M, val V, opts cmp.Options) (s string)
func MapContainsValueEqual ¶ added in v1.7.2
func MapContainsValueEqual[M ~map[K]V, K comparable, V interfaces.EqualFunc[V]](m M, val V) (s string)
func MapContainsValueFunc ¶ added in v1.7.2
func MapContainsValueFunc[M ~map[K]V, K comparable, V any](m M, val V, eq func(V, V) bool) (s string)
func MapContainsValues ¶ added in v0.2.5
func MapContainsValues[M ~map[K]V, K comparable, V any](m M, vals []V, opts cmp.Options) (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, opts cmp.Options) (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 MapEqOp ¶ added in v1.10.0
func MapEqOp[M interfaces.Map[K, V], K, V comparable](exp, val M) (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 MapNotContainsKey ¶ added in v0.6.0
func MapNotContainsKey[M ~map[K]V, K comparable, V any](m M, key K) (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 MapNotContainsValue ¶ added in v1.7.2
func MapNotContainsValue[M ~map[K]V, K comparable, V any](m M, val V, opts cmp.Options) (s string)
func MapNotContainsValueEqual ¶ added in v1.7.2
func MapNotContainsValueEqual[M ~map[K]V, K comparable, V interfaces.EqualFunc[V]](m M, val V) (s string)
func MapNotContainsValueFunc ¶ added in v1.7.2
func MapNotContainsValueFunc[M ~map[K]V, K comparable, V any](m M, val V, eq func(V, V) bool) (s string)
func MapNotContainsValues ¶ added in v0.4.6
func MapNotContainsValues[M ~map[K]V, K comparable, V any](m M, vals []V, opts cmp.Options) (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](value N) (s string)
func NonNegative ¶ added in v0.4.0
func NonNegative[N interfaces.Number](value N) (s string)
func NonPositive ¶ added in v0.4.0
func NonPositive[N interfaces.Number](value N) (s string)
func NonZero ¶ added in v0.2.5
func NonZero[N interfaces.Number](value 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 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 One ¶ added in v0.3.1
func One[N interfaces.Number](value N) (s string)
func Positive ¶ added in v0.2.5
func Positive[N interfaces.Number](value N) (s string)
func RegexpCompiles ¶ added in v0.3.0
func RegexpCompilesPOSIX ¶ added in v0.3.0
func SliceContains ¶ added in v0.4.0
func SliceContainsAll ¶ added in v0.4.0
func SliceContainsAllEqual ¶ added in v1.12.0
func SliceContainsAllEqual[E interfaces.EqualFunc[E]](slice, items []E) (s string)
func SliceContainsAllFunc ¶ added in v1.12.0
func SliceContainsAllOp ¶ added in v1.12.0
func SliceContainsAllOp[C comparable](slice, items []C) (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 SliceContainsOp ¶ added in v0.4.0
func SliceContainsOp[C comparable](slice []C, item C) (s string)
func SliceContainsSubset ¶ added in v0.4.1
func SliceContainsSubsetEqual ¶ added in v1.12.0
func SliceContainsSubsetEqual[E interfaces.EqualFunc[E]](slice, items []E) (s string)
func SliceContainsSubsetFunc ¶ added in v1.12.0
func SliceContainsSubsetOp ¶ added in v1.12.0
func SliceContainsSubsetOp[C comparable](slice, items []C) (s string)
func SliceEmpty ¶ added in v0.4.0
func SliceEqOp ¶ added in v1.10.0
func SliceEqOp[A comparable, S ~[]A](exp, val S) (s string)
func SliceEqual ¶ added in v0.4.0
func SliceEqual[E interfaces.EqualFunc[E]](exp, val []E) (s string)
func SliceNotContains ¶ added in v0.4.0
func SliceNotContainsFunc ¶ added in v0.6.3
func SliceNotEmpty ¶ added in v0.4.0
func StrContains ¶ added in v0.3.0
func StrContainsAny ¶ added in v0.3.0
func StrContainsFields ¶ added in v0.3.0
func StrContainsFold ¶ added in v0.3.0
func StrHasPrefix ¶ added in v0.3.0
func StrHasSuffix ¶ added in v0.3.0
func StrNotContains ¶ added in v0.3.0
func StrNotContainsAny ¶ added in v0.3.0
func StrNotContainsFold ¶ added in v0.3.0
func StrNotEqFold ¶ added in v0.3.0
func StrNotHasPrefix ¶ added in v0.3.0
func StrNotHasSuffix ¶ added in v0.3.0
func StructEqual ¶ added in v0.6.2
func StructEqual[E interfaces.CopyEqual[E]](original E, tweaks []Tweak[E]) (s string)
StructEqual will apply each Tweak and assert E.Equal captures the modification.
func Unreachable ¶ added in v0.2.8
func Unreachable() (s string)
func ValidJSONBytes ¶ added in v0.6.1
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](value N) (s string)
Types ¶
type Tweak ¶ added in v0.6.2
type Tweak[E interfaces.CopyEqual[E]] struct { Field string Apply interfaces.TweakFunc[E] }
Click to show internal directories.
Click to hide internal directories.