errorsutil

package
v0.32.0 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2021 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

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

type ErrorInfos []*ErrorInfo

func (ErrorInfos) ErrorsString

func (eis ErrorInfos) ErrorsString() []string

func (ErrorInfos) Filter

func (eis ErrorInfos) Filter(isError bool) ErrorInfos

func (ErrorInfos) GoodCorrects

func (eis ErrorInfos) GoodCorrects() []string

func (ErrorInfos) GoodInputs

func (eis ErrorInfos) GoodInputs() []string

func (ErrorInfos) Inflate

func (eis ErrorInfos) Inflate()

Jump to

Keyboard shortcuts

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