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

github.com/pkg/errors should be replaced by stdlib "errors" #1507

Open
mjtrangoni opened this issue Nov 7, 2023 · 1 comment
Open

github.com/pkg/errors should be replaced by stdlib "errors" #1507

mjtrangoni opened this issue Nov 7, 2023 · 1 comment
Labels

Comments

@mjtrangoni
Copy link
Contributor

Hi,

Checking my openziti_exporter project with the latest golangci-lint depguard plugin, it turns out that ziti is still using the already deprecated github.com/pkg/errors package.

See,

grep -Er 'github.com/pkg/errors' * | wc -l
     249

If you agree, I can open some "small" PRs replacing it with stdlib errors. Some other projects like prometheus started already the same procedure.

@plorenz
Copy link
Member

plorenz commented Nov 14, 2023

I've got mixed feelings about this. Even though pkg/errors is an archived project, it's a very simple project and I don't anticipate that issues will crop up. stdlib errors doesn't support stacks, which can be quite useful. I also like the Wrap syntax better than the fmt with %w, as it standardizes the format.

On the flip side, no one can report issues to an archived project, so if there is an issue, we may never find out about it. Also we haven't used the stack support in some time, so maybe we don't need it.

@ekoby suggested that we remove it from all the supporting libraries, at least, so it doesn't cause issues for developers using the SDK, which I think is reasonable. Then we can think about removing it from ziti.

@ekoby ekoby added the chore label Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants