hashicorp / hashicorp/go-multierror

Invitation to comment on proposed standard library multierror support

Open
#63 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
2.6k
Forks
143
PR merge metrics
No merged PRs in 30d

Description

Hi!

I have an in-review proposal to add support for wrapping multiple errors to the standard library. The latest version of the proposal is:
https://github.com/golang/go/issues/53435#issuecomment-1191752789

This proposal is intended to allow interoperation between multierror implementations, as well as to simplify these implementations. It isn't intended to supplant existing implementations, except in the simplest of cases. The quick summary of the proposal is that `errors.Is` and `errors.As` would support descending into multiple errors when a type implements an `Unwrap() []error` method returning a list of wrapped errors; for details see the above link.

I'm opening an issue in this repo to invite your comments on this proposal, either in the proposal issue or here. Would you find this feature useful? If adopted, would you add an `Unwrap() error` to your error types? Do you see any problems with this proposal, or are there changes that would make it more useful to you?

Thanks!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.