errors

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: May 18, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(messages ...string) error

func Wrap

func Wrap(err error, message string) error

func Wrapf

func Wrapf(err error, format string, args ...interface{}) error

Types

type Errors

type Errors []error

Errors is an error type to track multiple errors. This is used to accumulate errors in cases and return them as a single "error".

func (*Errors) Append

func (e *Errors) Append(errs ...error)

func (*Errors) Error

func (e *Errors) Error() string

func (*Errors) ErrorOrNil

func (e *Errors) ErrorOrNil() error

ErrorOrNil returns an error interface if this Error represents a list of errors, or returns nil if the list of errors is empty. This function is useful at the end of accumulation to make sure that the value returned represents the existence of errors.

Jump to

Keyboard shortcuts

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