-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IsAny() multi error support #140
IsAny() multi error support #140
Conversation
@dhartunian Hi David. I see your latest activity in this repository and would like to ask if contributions are welcome and if someone can review the changes? |
@nikitacrit thanks for the ping, I'll take a look when I get a chance, probably over the next few days. |
markers/markers.go
Outdated
"github.com/cockroachdb/redact" | ||
"github.com/gogo/protobuf/proto" | ||
|
||
"github.com/cockroachdb/errors/errbase" | ||
"github.com/cockroachdb/errors/errorspb" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: revert the import reordering.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done! And sorry I was forced to force push to keep the commit history clean.
@@ -361,6 +362,9 @@ func TestIsAny(t *testing.T) { | |||
err2 := errors.New("world") | |||
err3 := pkgErr.Wrap(err1, "world") | |||
err4 := pkgErr.Wrap(err2, "universe") | |||
err5 := errors.Join(err1, errors.New("gopher")) | |||
err6 := errors.Join(errors.New("gopher"), err2) | |||
err7 := errors.Join(err1, err2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a test case that wraps at the top level? That will ensure that the implementation is necessary within the UnwrapOnce
loop instead of outside.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
51ebea5
to
b0e6c50
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 2 files at r2.
Reviewable status: 1 of 2 files reviewed, all discussions resolved
markers/markers.go
line 26 at r1 (raw file):
Previously, nikitacrit (Nikita Sidorov) wrote…
Done! And sorry I was forced to force push to keep the commit history clean.
👍 I prefer squashed commits
Hello! At the moment the following code will produce the result "no". I suggest a fix based on the code found in the original method
Is()
.This change is