errgroup.WithContext returns a group and a derived context. g.Go(fn) starts a goroutine; g.Wait() blocks until all finish and returns the first non-nil error. g.SetLimit(n) bounds concurrency without writing a worker pool by hand.
errgroup
A `golang.org/x/sync` helper that runs goroutines together and cancels the rest on the first error.