Intermediate Go (Golang)
Q87 / 100

What is golang.org/x/sync/errgroup?

Correct! Well done.

Incorrect.

The correct answer is B) A package combining WaitGroup and error collection for multiple goroutines, canceling the group context on first error

B

Correct Answer

A package combining WaitGroup and error collection for multiple goroutines, canceling the group context on first error

Explanation

g, ctx := errgroup.WithContext(parent); g.Go(func() error { return work(ctx) }); if err := g.Wait(); err != nil { } — first error cancels ctx.

Progress
87/100