package
Version:
v0.0.0-...-41f935c
Opens a new window with list of versions in this module.
Published: Dec 4, 2024
License: MIT
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Must is an alias for Must1.
Must0 accepts any function call that returns an error.
If error is not nil then it panics.
Must1 accepts any function call that returns two values, T and error.
If error is not nil then it panics, otherwise it returns the value T.
func MustOK[T any](value T, ok bool) T
MustOK accepts any function call that returns two values, T and bool.
If bool is false then it panics, otherwise it returns the value T.
Map represents a collection of errors keyed by name.
Set associates the given error with the given key.
The map is lazily instantiated if it is nil.
Slice represents a collection of errors.
Append pushes the given error onto the end of the slice.
Any nil errors are ignored and discarded.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.