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

all: remove github.com/pkg/errors dependency #1033

Merged
merged 2 commits into from Feb 13, 2022

Conversation

zchee
Copy link
Member

@zchee zchee commented Feb 13, 2022

Remove github.com/pkg/errors dependency.

The https://github.com/pkg/errors package has been deprecated (archived). Use fmt.Errorf("...: %w", err) instead of.

Note that,

  • webhooks_go112.go for Go version 1.12. This means can't use the %w verb for wrapped error
    • Just use %v verb
  • fmt.Errorf haven't Cause interface and stacktrace. If you really want to them, we should use golang.org/x/xerrors but which is another dependency too
    • IMO, no need for backward compatibility to the Cause interface because slack-go/slack didn't use github.com/pkg/errors much

The github.com/pkg/errors package has been deprecated.

Signed-off-by: Koichi Shiraishi <zchee.io@gmail.com>
@zchee zchee force-pushed the remove-pkg-errors-deps branch from 9543137 to eaf6740 Compare Feb 13, 2022
Copy link
Member

@kanata2 kanata2 left a comment

LGTM. Thanks!

Copy link
Member

@kanata2 kanata2 left a comment

Ah, sorry.
This package currently activates vendoring.
So please run go mod vendor to remove pkg/errors.

@kanata2 kanata2 added api cleanup feedback given When a review has been conducted and awaiting the response from the comitter(s) labels Feb 13, 2022
Signed-off-by: Koichi Shiraishi <zchee.io@gmail.com>
@zchee
Copy link
Member Author

zchee commented Feb 13, 2022

@kanata2 good catch, PTAL.

Copy link
Member

@kanata2 kanata2 left a comment

👍

@kanata2 kanata2 merged commit bbab81d into slack-go:master Feb 13, 2022
6 checks passed
@zchee zchee deleted the remove-pkg-errors-deps branch Feb 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api cleanup feedback given When a review has been conducted and awaiting the response from the comitter(s)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants