errors

package
v0.8.4 Latest Latest
Warning

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

Go to latest
Published: May 18, 2021 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Errors

type Errors []error

Errors makes it easy to combine multiple errors into a single string

func (*Errors) AddErr added in v0.6.0

func (e *Errors) AddErr(err error) bool

AddErr appends an error if it is not nil. Smartly combines errors of type Errors

func (*Errors) ErrIf added in v0.6.0

func (e *Errors) ErrIf(condition bool, failureMessage string, formatArgs ...interface{}) bool

ErrIf appends an error with failureMessage if the condition is true Returns the condition to allow for further conditional checks

func (Errors) ErrOrNil added in v0.6.0

func (e Errors) ErrOrNil() error

ErrOrNil returns e if an error is present, otherwise returns nil

func (Errors) Error

func (e Errors) Error() string

func (Errors) MarshalJSON added in v0.8.4

func (e Errors) MarshalJSON() ([]byte, error)

Jump to

Keyboard shortcuts

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