Documentation
¶
Index ¶
- func AddAssertData(key string, value any)
- func Assert(truth bool, msg string)
- func Equals(a, b any, msg string)
- func GreaterThan[T cmp.Ordered](a, b T, msg string)
- func GreaterThanEquals[T cmp.Ordered](a, b T, msg string)
- func LessThan[T cmp.Ordered](a, b T, msg string)
- func LessThanEquals[T cmp.Ordered](a, b T, msg string)
- func NoError(err error, msg string)
- func NotEmptyMap[T ~map[K]V, K comparable, V any](m T, msg string)
- func NotEmptySlice[T ~[]E, E any](s T, msg string)
- func NotEquals(a, b any, msg string)
- func RemoveAssertData(key string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddAssertData ¶
Add a key-value pair to a map to log out when the program panics
func GreaterThan ¶
Checks if the first value is greater than the second one, if not, panics with a specified message
func GreaterThanEquals ¶
Checks if the first value is greater than or equals the second one, if not, panics with a specified message
func LessThan ¶
Checks if the first value is less than the second one, if not, panics with a specified message
func LessThanEquals ¶
Checks if the first value is less than or equals the second one, if not, panics with a specified message
func NoError ¶
Checks if the given error is nil, if not, logs out the error and panics with a specified message
func NotEmptyMap ¶
func NotEmptyMap[T ~map[K]V, K comparable, V any](m T, msg string)
Checks if a slice is not empty, if not, panics with a specified message
func NotEmptySlice ¶
Checks if a slice is not empty, if not, panics with a specified message
Types ¶
This section is empty.