Documentation ¶
Index ¶
- Variables
- func CatchPanic(err *error)
- func FatalOnError(err *error, l ...*logrus.Entry)
- func Handle(err *error, l ...*logrus.Entry)
- func HasKeys[K comparable, V any, M ~map[K]V](m M, ks ...K)
- func NoError(err error)
- func NotEmpty[T any](val []T)
- func NotNegative[T constraints.Integer | constraints.Float](val T)
- func NotNil[T any](val *T)
- func NotZero[T constraints.Integer | constraints.Float](val T)
- func Positive[T constraints.Integer | constraints.Float](val T)
- func SameSize[T, U any](a []T, b []U)
- func Success[T any](val T, err error) T
- type Op
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrAssertionFailed = falta.Newf("assert: [%s] assertion failed") ErrValueIsNil = falta.Newf("<%T> is nil") ErrContainerIsEmpty = falta.Newf("<%T> container is empty") ErrValueIsNegative = falta.Newf("%v < 0") ErrValueIsNotPositive = falta.Newf("%v <= 0") ErrValueIsZero = falta.Newf("value == 0") ErrErrorIsNotNil = falta.Newf("err is not nil: %v") ErrSlicesAreDifferentSizes = falta.Newf("slices are different sizes: %v != %v") ErrFuncReturnedError = falta.Newf("<%T> no error expected: %v") ErrKeyNotInMap = falta.Newf(`keys not in map: %v not in <%T>`) ErrPanic = falta.Newf("panic: %s") )
Functions ¶
func CatchPanic ¶ added in v0.4.0
func CatchPanic(err *error)
func FatalOnError ¶ added in v0.5.0
func HasKeys ¶
func HasKeys[K comparable, V any, M ~map[K]V](m M, ks ...K)
func NotNegative ¶
func NotNegative[T constraints.Integer | constraints.Float](val T)
func NotZero ¶
func NotZero[T constraints.Integer | constraints.Float](val T)
func Positive ¶
func Positive[T constraints.Integer | constraints.Float](val T)
Types ¶
Click to show internal directories.
Click to hide internal directories.