errx

package
v1.5.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 10, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func All

func All(errs ...error) error

All aggregates multiple errors into one (filters nil). Returns nil if all inputs are nil.

func DeferRecover

func DeferRecover(handler func(any))

DeferRecover is used in defer to catch panics and pass them to handler. Example:

defer util.DeferRecover(func(e any){ logger.Error().Any("panic", e).Msg("recovered") })

func First

func First(errs ...error) error

First returns the first non-nil error.

func Wrap

func Wrap(err error, msg string) error

Wrap adds context using fmt.Errorf and preserves the original error for unwrapping.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL