go-floc
go-floc copied to clipboard
How can i handle multiple errors from Parallel execution
I can't seem to figure out how to handle multiple errors occurring in parallel.
func fail(msg string) floc.Job {
return func(ctx floc.Context, ctrl floc.Control) error {
return errors.New("error " + msg)
}
}
flow := run.Parallel(fail("asd"), fail("qwe"))
result, data, err := floc.Run(flow)
The err
only contains one of the errors as far as I can tell. Seems like there is an ErrMultiple type, but I don't know how to use it.
Thank you for your help!