Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FlattenErrors ¶
FlattenErrors possibly creates a MultiError. Nil entries are ignored. If all provided errors are nil (or nothing is provided), nil is returned. If only one non-nil error is provided, it is returned unchanged. If two or more non-nil errors are provided, the returned error will be of type *MultiError and it will contain each non-nil error.
Types ¶
type MultiError ¶
type MultiError struct {
// contains filtered or unexported fields
}
MultiError is an error combining multiple other errors. It will never have 0 or 1 errors. It will always have two or more.
func (*MultiError) Error ¶
func (e *MultiError) Error() string
Error implements the error interface for a MultiError.
func (MultiError) GetErrors ¶
func (e MultiError) GetErrors() []error
GetErrors gets all the errors that make up this MultiError.
func (MultiError) Len ¶
func (e MultiError) Len() int
Len gets the number of errors in this MultiError.
func (MultiError) String ¶
func (e MultiError) String() string
String implements the string interface for a MultiError.