package
Version:
v0.0.4
Opens a new window with list of versions in this module.
Published: Nov 19, 2022
License: Apache-2.0
Opens a new window with license information.
Imports: 0
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package must contains generic functions for ensuring a function is called
that returns a nil error.
func Compute[T any](fn func() (T, error)) T
Compute returns fn()'s first return value and panics if err is non-nil.
Do panics if calling the function results in an error.
Value returns the first value if the err is non-nil; otherwise, it panics.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.