Skip to content

proposal: x/sync/errgroup: optionally collect all errors #72101

Closed as not planned
@imjasonh

Description

@imjasonh

Proposal Details

When using errgroup.Group, the current behavior is to fail and return the first error that's encountered. This works great. errgroup is consistently one of my favorite packages to use.

But, sometimes I want to collect and report all errors at the end.

Luckily, we have errors.Join to do just this!

I'd like to propose either an optional method to make errgroup collect errors, or a type/package/something to do what errgroup does, with this behavior.

I'm open to any naming or structure you folks would recommend, and I'd be happy to send a CL to implement it if there's interest.

Metadata

Metadata

Assignees

No one assigned

    Labels

    LibraryProposalIssues describing a requested change to the Go standard library or x/ libraries, but not to a toolProposal

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions