Re:Go Things I Love: Channels and Goroutines
by atombender on Tuesday January 07, 2020 @10:30AM
(#21980831)
As an aside, I recommend run.Group [1] as a replacement for WaitGroup. It implements a very common pattern where you have N goroutines that should execute as one unit (if one fails, everyone else should abort) and allows you to the final error. Similar to ErrGroup, but better.
[1] https://github.com/oklog/run