Comment by 9rx
> This means you can't pass variables in as function arguments.
Well, you could...
for _, url := range urls {
wg.Go(func(u string) func() {
return func() {
http.Get(u)
}
}(url))
}
> You need to use this pattern insteadWhy? Seems rather redundant. It is not like WaitGroup.Go exists in earlier versions.