fabric
fabric copied to clipboard
Remove usage of fmt.Errorf
The patchset uses the errors pkg to follow the guideline at
https://hyperledger-fabric.readthedocs.io/en/latest/error-handling.html
Change-Id: I36eaac1b429c69195e4af1bb5bb25fc1a2578168
Type of change
- Improvement (improvement to code, performance, etc)
Description
Remove the usage of fmt.Errorf. Follow the official guideline to change to the errors package.
Additional details
N/A
Related issues
N/A
Release Note
N/A
I'm not sure these guidelines are still up-to-date, since github.com/pkg/errors has been archived 2 years ago and is effectively a dead project. @denyeart wdyt?
@ale-linux I made an initial comment over at https://github.com/hyperledger/fabric/pull/4461#issuecomment-1747668231.
I've also opened issue #4468 with more background so that we can discuss a plan in more detail.
My suggestion would be to not make these error handling changes until we've got some more opinions gathered in #4468.