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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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