Call WaitGroup.Add before launching the goroutine
WaitGroup.Add called inside the goroutine races with Wait.
#Metadata
#Why it matters
`sync.WaitGroup.Add` must happen before the launching goroutine returns to the caller. If `Add` runs inside the goroutine, `Wait` may observe a zero counter and return before the work begins.
#Remediation
Call `wg.Add(n)` on the launching goroutine before the `go` statement starts the worker.
#Repository path
The generated metadata points to critiq-rules/libs/rules/catalog/rules/go/go.correctness.waitgroup-add-in-goroutine.rule.yaml.