Documentation ¶
Overview ¶
Example Use case for this library
import "github.com/cloudfoundry/multierror"
errors := multierror.MultiError{}
err1 := FirstFuncThatReturnsError() err2 := SecondFuncThatReturnsError()
errors.Add(err1) errors.Add(err2)
//You can also add multierror structs and they will be flattened into one struct errors2 := multierror.MultiError() errors2.Add(err1) errors.Add(errors2)
errors.Error()
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MultiError ¶
type MultiError struct { Message string Errors []*MultiError // contains filtered or unexported fields }
func NewMultiError ¶
func NewMultiError(message string) *MultiError
func (*MultiError) Add ¶
func (m *MultiError) Add(e error)
func (*MultiError) Error ¶
func (m *MultiError) Error() string
func (*MultiError) Length ¶
func (m *MultiError) Length() int
Click to show internal directories.
Click to hide internal directories.