package neosync import "sync" func AwaitWG(wg *sync.WaitGroup) <-chan struct{} { c := make(chan struct{}) go func() { wg.Wait() close(c) }() return c }