Closed vaguecoder closed 8 months ago
After this change, as we do not expose the errors.Wrap, how are users supposed to use this feature?
@rs I totally missed that Wrap
is required by users. Can it be included in the same package as MarshalStack? I understand that it means extending pkgerrors
layer.
Reading the change I'm not really fan of the resulting API. I wonder if we could keep backward compat (when getting a wrapped error) and at the same time, auto-wrap an error when Stack is present and Err is called. This way we do not expose a new API.
Motivation
Issue #470 reported by @skormos
Changes
Adds new internal package
errors
with test coverage.Summary
Localizes following functions (and required types and methods) from github.com/pkg/errors as it is no longer being maintained.
Related Issues
Closes #470 Helps in #462