multierror

package
v1.0.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2020 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Errors

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

Errors is an error list, it helps return multi-errors.

func New

func New() *Errors

New creates an errors.

func NewWithError

func NewWithError(err error) *Errors

NewWithError creates an errors and adds the given error.

func (*Errors) Add

func (e *Errors) Add(err error)

Add adds error to inner if given error is not nil.

func (*Errors) Error

func (e *Errors) Error() string

Error implements error interface.

func (*Errors) ErrorOrNil

func (e *Errors) ErrorOrNil() error

ErrorOrNil returns nil if no errors.

func (*Errors) RawError

func (e *Errors) RawError() []error

RawError returns inner errors as a slice.

func (*Errors) SetFormatter

func (e *Errors) SetFormatter(f func([]error) string)

SetFormatter sets inner formatter. The formatter used to formatted the error string.

Jump to

Keyboard shortcuts

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