Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrMap ¶
ErrMap is a map[int]error where the key is the index of the input that failed. ErrMap implements Stringer. ErrMap implements Error.
func Do ¶
Do runs the do func for each input in the inputs slice in parallel and returns a slice of results and an error. The length of the result slice will always be the same length as the inputs slice. If no errors occurred in the execution of the do funcs, the returned err will be nil. If errors occurred in the execution of the do funcs, the result slice will have the zero value of the OUT type at the indexes of the failed inputs.
func (ErrMap) ErrJoin ¶
ErrJoin joins all the errors in the ErrMap in a deterministic way. Each error is of the form "<key>: <error>".