Skip to content

Commit

Permalink
Update errgroup WithContext description
Browse files Browse the repository at this point in the history
  • Loading branch information
roeldev committed Feb 4, 2024
1 parent b27cec8 commit 381228e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion errgroup/group.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ type Group struct {

// WithContext returns a new Group and an associated context.Context derived
// from ctx. Unlike golang.org/x/sync/errgroup.Group, the derived context is not
// canceled the first time a function passed to Go returns a non-nil error.
// canceled the first time a function passed to Group.Go returns a non-nil
// error.
func WithContext(ctx context.Context) (*Group, context.Context) {
ctx, cancel := context.WithCancelCause(ctx)
return &Group{cancel: cancel}, ctx
Expand Down

0 comments on commit 381228e

Please sign in to comment.