Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DefaultCapacity uint = 8
Functions ¶
This section is empty.
Types ¶
type ErrorLister ¶
type ErrorLister interface { // ErrorList returns a List of collected non-nil errors. ErrorList() *List }
type List ¶
type List struct {
// contains filtered or unexported fields
}
List is a thread-safe error list. Its zero value is ready to use.
func NewWithCapacity ¶ added in v0.10.0
NewWithCapacity creates a new List with a pre-allocated capacity.
func (*List) Append ¶
Append an error to the List. It guarantees only non-nil errors are added. It returns true when the error is appended to the list, false otherwise.
func (*List) AppendUnique ¶ added in v0.11.0
AppendUnique appends an error to the List and guarantees that the error is non-nil and unique within the List. It returns true when the error is appended to the list, false otherwise.
func (*List) Join ¶
Join the collected errors. It uses the same rules and logic as the Join function.
func (*List) Prepend ¶
Prepend an error to the list. It guarantees only non-nil errors are added. It returns true when the error is appended to the list, false otherwise.