enmasse icon indicating copy to clipboard operation
enmasse copied to clipboard

Proposal to adopt "errors" in go components

Open ctron opened this issue 5 years ago • 3 comments

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.

ctron avatar Mar 11 '20 09:03 ctron

+1 - looks very useful.

lulf avatar Mar 11 '20 09:03 lulf

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

ctron avatar Mar 11 '20 10:03 ctron

+1 from me too.

k-wall avatar Mar 11 '20 14:03 k-wall