Documentation ¶
Overview ¶
Package errutil contains common error-related utilities.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Multi ¶
Multi combines multiple errors into one:
If all errors are nil, it returns nil.
If there is one non-nil error, it is returned.
Otherwise, the return value is an error whose Error methods contain all the messages of all non-nil arguments.
If the input contains any error returned by Multi, such errors are flattened. The following two calls return the same value:
Multi(Multi(err1, err2), Multi(err3, err4)) Multi(err1, err2, err3, err4)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.