package
Version:
v0.27.3
Opens a new window with list of versions in this module.
Published: Dec 26, 2025
License: MIT
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Check check no error or else panic.
Must Must get value with no error or else panic.
func Try[T any](f func() T) (t T, err error)
Try recover panic from f and save the recovered value to error.
func TryDo(f func()) (err error)
TryDo is similar to Try but for function without 0 result.
func TryGo(f func()) <-chan error
TryGo spawn a new goroutine and recover panic from f and send the recovered value or nil to error chan.
type PanicError struct {
Value any
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.