errorsutil

package
v1.3.5 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Append

func Append(err error, str string) error

Append adds additional text to an existing error.

func ErrorsToStrings added in v1.0.2

func ErrorsToStrings(errs []error) (int, []string)

func Join

func Join(inclNils bool, errs ...error) error

func PanicOnErr

func PanicOnErr(err error)

PanicOnErr is a syntactic sugar function to panic on error.

Types

type ErrorInfo

type ErrorInfo struct {
	Error       error
	ErrorString string // must match Error
	Code        string
	Summary     string
	Description string
	Explanation string
	Source      string
	Input       string
	Correct     string
}

type ErrorInfos added in v1.0.2

type ErrorInfos []*ErrorInfo

func (ErrorInfos) ErrorsString added in v1.0.2

func (eis ErrorInfos) ErrorsString() []string

func (ErrorInfos) Filter added in v1.0.2

func (eis ErrorInfos) Filter(isError bool) ErrorInfos

func (ErrorInfos) GoodCorrects added in v1.0.2

func (eis ErrorInfos) GoodCorrects() []string

func (ErrorInfos) GoodInputs added in v1.0.2

func (eis ErrorInfos) GoodInputs() []string

func (ErrorInfos) Inflate added in v1.0.2

func (eis ErrorInfos) Inflate()

Jump to

Keyboard shortcuts

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