3 ms·
I love errgroup, though I always use it like this g, gCtx := errgroup.WithContext(ctx) And then use gCtx in the g.Go function calls. That would have avoi
by nickcw 1y ago
I love errgroup, though I always use it like this
g, gCtx := errgroup.WithContext(ctx)
And then use gCtx in the g.Go function calls.
That would have avoided the problem.
Perhaps worth a submission to https://staticcheck.dev/ https://staticcheck.dev/ ?
- nikolayasdf123 1y agoI just made very simpler linter for this: https://github.com/nikolaydubina/lint-errgroup-ctx https://github.com/nikolaydubina/lint-errgroup-ctx