multierror

package
v3.2.7+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2021 License: Apache-2.0, MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cause

func Cause(err error) error

Cause returns the underlying cause of the error.

func MultilineFormat

func MultilineFormat(errs []error, w io.Writer)

MultilineFormat error print format

Types

type ErrorFormat

type ErrorFormat func([]error, io.Writer)

ErrorFormat error print format definition

type MultiError

type MultiError struct {
	Format ErrorFormat
	// contains filtered or unexported fields
}

MultiError multiple error

func Combine

func Combine(errs ...error) *MultiError

Combine merge multiple error and create MultiError

func (*MultiError) Append

func (me *MultiError) Append(errs ...error)

Append append error to MultiError

func (*MultiError) Error

func (me *MultiError) Error() string

Error return error format output

func (*MultiError) ErrorOrNil

func (me *MultiError) ErrorOrNil() error

ErrorOrNil if contained errors then return self,else return nil

func (*MultiError) Errors

func (me *MultiError) Errors() []error

Errors return contained errors

Jump to

Keyboard shortcuts

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