Usage of cockroachdb/errors package #1328
Closed
mariuskimmina
started this conversation in
General
Replies: 1 comment
-
We used cockroachdb/errors mostly for |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I found that we are currently using both
cockroachdb/errors
as well as the standard libraryerrors
package.Both of these numbers are from the
cnquery
repo.I was wondering if there are specific cases in which we needed the
cockroachdb/errors
package over the standard library ones?I haven't looked at all the cases in which we use
cockroachdb/errors
but in the cases I looked at I often found that we only callederrors.New()
anyway - which should behave the same as standard librarryerrors.New()
if I am not mistaken. We do seem to make use oferrors.Wrap()
from the cockroach module in some places but I think these could also be done withfmt.Errorf()
.Essentially I am trying to figure out if there is a strong reason to keep using
cockroachdb/errors
over the standard libraryerrors
package or if it could be worth doing a refactor to get rid of this dependency.Beta Was this translation helpful? Give feedback.
All reactions