ErrorGroup
is an error type that can hold other errors together.
go get -u github.com/txgruppi/errorgroup
Sometimes I have a loop running functions in parallel and because of the existing API of most the Go libs I need to return only one error.
I don't want to throw away such important information, so I group them together.
go get -u -t github.com/txgruppi/errorgroup-go
cd $GOPATH/src/github.com/txgruppi/errorgroup-go
go test ./...
MIT