Waiting for Goroutines with sync.WaitGroup and errgroup.Group
Published: 28. February 2026 • go
Go makes it easy to run code in parallel with goroutines. To wait for them to finish, you can use sync.WaitGroup or errgroup.Group. This post explains how to use both and when to choose one over the other.