errutil

package
v0.0.0-...-6378e9d Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Append

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

Append combines the provided error with a list of errors.

func Ignore

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

type MultiError []error

MultiError is a collection of errors.

func (MultiError) Error

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