sql-runner icon indicating copy to clipboard operation
sql-runner copied to clipboard

Use github.com/pkg/errors everywhere

Open colmsnowplow opened this issue 4 years ago • 1 comments

We import this package in https://github.com/snowplow/sql-runner/pull/192/files, do more neatly handle a case where we need to wrap errors.

Once we have the space to do so, we should use that package instead of the default errors package, and take any opportunities we can to improve on error reporting.

colmsnowplow avatar Jan 24 '22 14:01 colmsnowplow

github.com/pkg/errors has been archived and is not maintained anymore. You should maybe consider switching to something else instead as you are updating error handling?

Shameless plug: you can switch it to drop-in replacement gitlab.com/tozd/go/errors. It fixes many issues, is maintained, and supports modern Go's error patterns (sentinel errors, %w formatting, joined errors, etc.).

mitar avatar Oct 09 '23 09:10 mitar