Skip to content
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

Closed
mvdan opened this issue Aug 23, 2022 · 2 comments · Fixed by #124
Closed

please drop github.com/pkg/errors #123

mvdan opened this issue Aug 23, 2022 · 2 comments · Fixed by #124

Comments

@mvdan
Copy link

mvdan commented Aug 23, 2022

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 and Errorf should be the same, and calls to Wrap can be replaced with Errorf("some message: %w", err).

@mvdan
Copy link
Author

mvdan commented Aug 24, 2022

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 go.mod to say go 1.17 and run go mod tidy.

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).
@nvanbenschoten
Copy link
Member

@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
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants