errors

package
v0.0.0-...-a426a1e Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsMetricViolationError

func IsMetricViolationError(err error) bool

IsMetricViolationError checks if given error is MetricViolation type.

func NewMetricViolationError

func NewMetricViolationError(metric, reason string) error

NewMetricViolationError creates new metric violation error.

Types

type ErrorList

type ErrorList struct {
	// contains filtered or unexported fields
}

ErrorList is a thread-safe error list.

func NewErrorList

func NewErrorList(errors ...error) *ErrorList

NewErrorList creates new error list.

func (*ErrorList) Append

func (e *ErrorList) Append(errs ...error)

Append adds errors to the list

func (*ErrorList) Concat

func (e *ErrorList) Concat(e2 *ErrorList)

Concat concatenates error lists.

func (*ErrorList) Error

func (e *ErrorList) Error() string

Error returns string representation of ErrorList.

func (*ErrorList) IsEmpty

func (e *ErrorList) IsEmpty() bool

IsEmpty returns true if there is no error in the list.

func (*ErrorList) String

func (e *ErrorList) String() string

String returns error list as a single string.

Jump to

Keyboard shortcuts

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