Documentation
¶
Overview ¶
Package must provides runtime assertions. Violation of these assertions indicates a program fault, and should cause a crash to prevent operating with invalid data.
Index ¶
- func BeEmptyMapf[K comparable, V any](m map[K]V, format string, args ...any)
- func BeEqualf[T comparable](a, b T, format string, args ...any)
- func BeInRangef[T cmp.Ordered](v, min, max T, format string, args ...any)
- func Bef(b bool, format string, args ...any)
- func Failf(format string, args ...any)
- func NotBeBlankf(s string, format string, args ...any)
- func NotBeEmptyf[T any](es []T, format string, args ...any)
- func NotBeEqualf[T comparable](a, b T, format string, args ...any)
- func NotBeNilf(v any, format string, args ...any)
- func NotBeZerof[T comparable](v T, format string, args ...any)
- func NotBef(b bool, format string, args ...any)
- func NotContainf[T comparable](es []T, e T, format string, args ...any)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BeEmptyMapf ¶
func BeEmptyMapf[K comparable, V any](m map[K]V, format string, args ...any)
BeEmptyMapf panics if m is not an empty map.
func BeEqualf ¶
func BeEqualf[T comparable](a, b T, format string, args ...any)
BeEqualf panics if a != b.
func BeInRangef ¶
BeInRangef panics if v is not in the range [min, max).
func NotBeBlankf ¶
NotBeBlankf panics if s is empty or contains only whitespace.
func NotBeEmptyf ¶
NotBeEmptyf panics if es is an empty slice.
func NotBeEqualf ¶
func NotBeEqualf[T comparable](a, b T, format string, args ...any)
NotBeEqualf panics if a == b.
func NotBeZerof ¶
func NotBeZerof[T comparable](v T, format string, args ...any)
NotBeZerof panics if v is the zero value.
func NotContainf ¶
func NotContainf[T comparable](es []T, e T, format string, args ...any)
NotContainf panics if e is in es.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.