Open ctron opened 4 years ago
+1 - looks very useful.
I just figured out we already have it as a transient dependency. So it is more a question if we want to use it ourselves.
See: https://github.com/EnMasseProject/enmasse/tree/master/vendor/github.com/pkg/errors
+1 from me too.
Overview
I would like to propose that we adopt the use of the "errors" module when working with Go.
See: https://github.com/pkg/errors
Design
In a nutshell this enables you to use an error cause chain, similar to Java or Rust.
Take a look at the README of the repository. It should explain nicely what this is all about.
Tasklist
There is no immediate action other than adding the module, and importing it to the vendors folder.
Over time we can/should adapt our source code to make use of this, so that we can have cause information when things go wrong.