fabric icon indicating copy to clipboard operation
fabric copied to clipboard

Remove usage of fmt.Errorf

Open yeasy opened this issue 2 years ago • 2 comments

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

yeasy avatar Oct 04 '23 21:10 yeasy

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 avatar Oct 05 '23 07:10 ale-linux

@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.

denyeart avatar Oct 05 '23 18:10 denyeart