Glossary: Go Beyond the Basics
WaitGroup
Also written: sync.WaitGroup, wg.Go, wg.Wait
A counter from package `sync` that waits for a group of goroutines. `wg.Go(f)` starts and counts a goroutine, and `wg.Wait()` blocks until all have finished.
Glossary: Go Beyond the Basics
Also written: sync.WaitGroup, wg.Go, wg.Wait
A counter from package `sync` that waits for a group of goroutines. `wg.Go(f)` starts and counts a goroutine, and `wg.Wait()` blocks until all have finished.