Default severity: error
sync.WaitGroup.Go calls Done automatically when its task returns, and its
contract requires the task not to panic. Calling Done manually corrupts the
counter; panic and recover indicate a task that does not satisfy the API
contract.
Bad
group.Go(func() {
defer group.Done()
work()
})Good
group.Go(func() {
work()
})