EnMasseProject / enmasse

EnMasse - Self-service messaging on Kubernetes and OpenShift
https://enmasseproject.github.io
Apache License 2.0
190 stars 87 forks source link

Proposal to adopt "errors" in go components #4087

Open ctron opened 4 years ago

ctron commented 4 years ago

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.

lulf commented 4 years ago

+1 - looks very useful.

ctron commented 4 years ago

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

k-wall commented 4 years ago

+1 from me too.