errorsutil

package
v0.36.2 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2022 License: MIT Imports: 2 Imported by: 74

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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.

func Wrap added in v0.33.8

func Wrap(err error, prefix string) 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