errutil

package
v0.23.1 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2023 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Append added in v0.20.0

func Append(err error, errs ...error) error

Append combines the provided error with a list of errors.

func Ignore added in v0.22.7

func Ignore[T any](v T, _ error) T

Ignore is a helper function that returns the first argument and ignores the error.

func Must

func Must[T any](v T, err error) T

Must is a helper function that panics when the error is not nil. Otherwise, it returns the first argument. It is intended for use with functions that should never return an error when called.

Types

type MultiError added in v0.20.0

type MultiError []error

MultiError is a collection of errors.

func (MultiError) Error added in v0.20.0

func (m MultiError) Error() string

Error implements the error interface.

Jump to

Keyboard shortcuts

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