Documentation ¶
Index ¶
- type List
- func (l *List) Add(e error)
- func (l *List) AddErrorf(spec string, args ...interface{})
- func (l *List) Error() string
- func (l *List) FmtEach(spec, join string) string
- func (l *List) FmtIndented() string
- func (l *List) FmtList() string
- func (l *List) HasErrors() bool
- func (l *List) Len() int
- func (l *List) Maybe() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type List ¶
type List []error
List is our basic error-container representation.
func (*List) Error ¶
Error returns the error string for the container, letting it be an error type in and of itself. We reserve the right to panic if called on an empty container, to better expose checks.
func (*List) FmtEach ¶
FmtEach applies a format-string to each error in the List, then joins the result on the supplied join string. If there are no errors then the result is guaranteed to be the empty string. The format-string should supply one format expando, which is given one error at a time.
func (*List) FmtIndented ¶
Click to show internal directories.
Click to hide internal directories.