errutil

package
v0.0.0-...-3948e75 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2020 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotImplemented = xerrors.New("not implemented")

ErrNotImplemented is returned when feature is currently not implemented.

Functions

func AssertionFailure

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

AssertionFailure is used for an error resulting from the failure of an expected invariant.

func UnexpectedType

func UnexpectedType(t interface{}) error

UnexpectedType builds an error for an unexpected type, typically in a type switch.

Types

type Errors

type Errors []error

Errors is a collection of errors.

func (*Errors) Add

func (e *Errors) Add(err ...error)

Add appends errors to the list.

func (*Errors) Addf

func (e *Errors) Addf(format string, args ...interface{})

Addf adds a formatted error to the list.

func (Errors) Err

func (e Errors) Err() error

Err returns an error equivalent to this error list. If the list is empty, Err returns nil.

func (Errors) Error

func (e Errors) Error() string

Error implements the error interface.

Jump to

Keyboard shortcuts

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