I use juju as a drop-in replacement for the base "errors" package. In all cases until now I could just swap out the import line and not worry about it, however with the addition of errors.Is and errors.As I've had to separately import the old errors package to keep those functions.
Can juju get .Is and .As aliases for the regular error package versions, and add a .Unwrap method to its errors?
I think the first two are trivial, but I believe .Unwrap is supposed to return the immediate parent, so it's not quite the same as juju's .Cause.
If this is reasonable I can make a PR.
I use juju as a drop-in replacement for the base "errors" package. In all cases until now I could just swap out the import line and not worry about it, however with the addition of errors.Is and errors.As I've had to separately import the old errors package to keep those functions.
Can juju get .Is and .As aliases for the regular error package versions, and add a .Unwrap method to its errors?
I think the first two are trivial, but I believe .Unwrap is supposed to return the immediate parent, so it's not quite the same as juju's .Cause.
If this is reasonable I can make a PR.