Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SafeGo ¶
func SafeGo(fn func())
SafeGo wraps a goroutine with panic recovery. Use this instead of bare `go func()` everywhere.
func SafeGoWithContext ¶
func SafeGoWithContext(cancel context.CancelFunc, fn func())
SafeGoWithContext wraps a goroutine with panic recovery and context cancellation. On panic, cancel() is called to propagate failure to parent context.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.