Documentation ¶
Index ¶
- type ErrorList
- func (e *ErrorList) AddError(err error)
- func (e *ErrorList) AddErrors(errs ...error)
- func (e *ErrorList) AddString(err string)
- func (e *ErrorList) AddStringf(t string, args ...interface{})
- func (e *ErrorList) AddStrings(errs ...string)
- func (e *ErrorList) AddWrap(err error, msg string)
- func (e *ErrorList) AddWrapf(err error, format string, args ...interface{})
- func (e *ErrorList) ErrorStrings() []string
- func (e *ErrorList) String() string
- func (e *ErrorList) ToError() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrorList ¶
type ErrorList struct {
// contains filtered or unexported fields
}
ErrorList is a wrapper around many errors
func NewErrorListWithErrors ¶
NewErrorListWithErrors returns a new ErrorList with the given errors.
func (*ErrorList) AddErrors ¶
AddErrors adds the non-nil errors in the given slice to the list of errors.
func (*ErrorList) AddStringf ¶
AddStringf adds a templated string
func (*ErrorList) AddStrings ¶
AddStrings adds multiple string based errors to the list.
func (*ErrorList) AddWrap ¶
AddWrap is a convenient wrapper around `AddError(errors.Wrap(err, msg))`.
func (*ErrorList) AddWrapf ¶
AddWrapf is a convenient wrapper around `AddError(errors.Wrapf(err, format, args...))`.
func (*ErrorList) ErrorStrings ¶
ErrorStrings returns all the error strings in this ErrorList as a slice, ignoring the start string.
Click to show internal directories.
Click to hide internal directories.