How hanks/merrgroup works
Project type and purpose
• This is a Go library (“merrgroup”) that augments the standard
golang.org/x/sync/errgroup package by collecting *all* errors
from spawned goroutines instead of just one.
• Key indicators:
• Top-level files merrgroup.go, merrgroup_test.go
• README describes it as a “multi error version” of errgroup
• A demo/demo.go showing usage
File structure
• Top-level:
• merrgroup.go – the core library code
• merrgroup_test.go & orig_errgroup_test.go – unit tests comparing behavior
• demo/demo.go – example client code
• go.mod, go.sum – module dependencies
• Makefile & .github/workflows/go-test.yml – build/test CI
• Pattern: a single package implementing a concurrency primitive with tests and a demo client
README for additional insights
• API surface mirrors errgroup: New, Go(func), Wait()
• The difference: Wait returns an aggregate of all errors
• Encouraged usage is identical to errgroup, making it drop-in compatible