Gateway clean shutdown
Created by: VoidingWarranties
I chose to put the wg.Add(1)
wg.Done()
s on the calling side because they are not necessarily called from goroutines. The godocs also suggest putting the Add
outside the goroutine. It also makes it easy to visually check that all goroutines have a corresponding Add
and Done
.