Documentation
¶
Overview ¶
Package panichandler provides a panic handling errgroup.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrPanic = errors.New(goroutinePanicked)
ErrPanic is the error returned when a task panics.
Functions ¶
Types ¶
type ErrGroup ¶
type ErrGroup struct {
// contains filtered or unexported fields
}
ErrGroup wraps golang.org/x/sync/errgroup.Group to handle panics by turning them into errors. It MUST be created using NewErrGroup.
func ErrGroupWithContext ¶
ErrGroupWithContext creates a new ErrGroup with the given context.
func (*ErrGroup) Go ¶
Go runs the given function in a goroutine, handling panics by turning them into errors.
Click to show internal directories.
Click to hide internal directories.