Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Waitgroups: What they are, how to use them and what changed with Go 1.25. Parent comment
Well, you could...
for _, url := range urls { wg.Go(func(u string) func() { return func() { http.Get(u) } }(url)) }
Why? Seems rather redundant. It is not like WaitGroup.Go exists in earlier versions.
There are no comments on this comment yet.
Well, you could...
> You need to use this pattern insteadWhy? Seems rather redundant. It is not like WaitGroup.Go exists in earlier versions.