-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
please drop github.com/pkg/errors #123
Comments
A clarification: you might not end up with zero module dependencies, because lib/pq is still a test dependency. I think you should also bump your |
nvanbenschoten
added a commit
to nvanbenschoten/apd
that referenced
this issue
Sep 9, 2022
Fixes cockroachdb#123. Now that the stdlib's "errors" package supports wrapping, use it to eliminate a dependency on "github.com/pkg/errors". Picks up the "lib/pq" test dependency. Bump `go.mod` to `go 1.17` to allow users of the library to prune this dependency (https://go.dev/ref/mod#graph-pruning).
@mvdan I just published a new release that includes #124: https://github.com/cockroachdb/apd/releases/tag/v3.1.1. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Now that the standard library's errors package supports wrapping errors in a... standard way :) There shouldn't be a need to use pkg/errors anymore.
This has the advantage that the library will have zero dependencies, which is nice!
I can try to send a patch, though I don't know what formatting style the errors are meant to follow in this project, so it might be easiest for one of the maintainers or developers to do it directly. Calls to
New
andErrorf
should be the same, and calls toWrap
can be replaced withErrorf("some message: %w", err)
.The text was updated successfully, but these errors were encountered: