errors

package
v0.0.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MultiError

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

MultiError represents multiple errors https://biosphere.cc/software-engineering/returning-multiple-errors-in-go/

func (*MultiError) Add

func (m *MultiError) Add(es ...error)

Add adds one or many errors nil errors are not appended

func (MultiError) Error

func (m MultiError) Error() string

Error returns a human readable string indicating the number of errors that are contained but no specifics on the actual errors TODO: make it work like error wrapping

func (MultiError) Errors

func (m MultiError) Errors() []error

Errors returns the list of errors

func (MultiError) Len

func (m MultiError) Len() int

Len returns the number of errors

func (*MultiError) Return

func (m *MultiError) Return() error

Return returns itself if errors are set, otherwise nil.

Jump to

Keyboard shortcuts

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