Skip to content

Glossary: Go in Practice

WaitGroup

Also written: sync.WaitGroup, wg.Go, wg.Wait

Lets a test start many goroutines and wait for all of them to finish. `wg.Go` starts one and `wg.Wait` waits.

Where the book teaches it

Related terms

atomic.Int64Data race