https://github.com/andrewstuart/multierrgroup
https://github.com/andrewstuart/multierrgroup
Last synced: 12 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/andrewstuart/multierrgroup
- Owner: andrewstuart
- License: mit
- Created: 2021-05-16T16:06:09.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2023-06-26T19:52:55.000Z (almost 3 years ago)
- Last Synced: 2025-04-10T19:26:39.223Z (about 1 year ago)
- Language: Go
- Size: 16.6 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
[](https://pkg.go.dev/github.com/andrewstuart/multierrgroup)
[](https://goreportcard.com/report/github.com/andrewstuart/multierrgroup)
Multierrgroup provides a marriage of
[x/sync/errgroup](https://pkg.go.dev/golang.org/x/sync/errgroup.Group) and
hashicorp's [multierror](https://pkg.go.dev/github.com/hashicorp/go-multierror).
Start up as many error-returning goroutines as you need and get a multierror
with all the failures that occurred once they're all finished.
```go
var meg multerrgroup.Group
meg.Go(func() error {
// Do something dangerous
})
meg.Go(func() error {
// Try something you know will probably never work
})
err := meg.Wait()
```