Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Go ¶
Go runs the given function in a new goroutine and recovers from panic in it. Panics are logged using the provided logger (if non-nil). If the logger is nil, the function is run without panic recovery.
func Run ¶
Run runs the given function synchronously and recovers from panic in it. Panics are logged using the provided logger (if non-nil). If the logger is nil, the function is run without panic recovery.
func RunFunc ¶
RunFunc returns a function wrapped with panic recovery, suitable for use in errgroup.Go. Panics are logged using the provided logger (if non-nil), and the returned function returns a non-nil error. Do not try to "unwrap" r to an error, since it is a panic and we don't want to lose the fact that it was a panic.
Types ¶
This section is empty.