-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Description
https://github.com/pkg/errors is deprecated, archived, and in maintenance mode, since Go errors natively support wrapping since Go 1.13.
There are about 200 files in this repo that depend on this package (excluding vendor/):
git grep -l github.com/pkg/errors | grep -v ^vendor | wc -l
196
It should be a fairly mechanical change:
errors.Wrap(err, "oh no")becomesfmt.Errorf("oh no: %w", err)errors.New("oh no")becomeserrors.New("oh no"), using the stdliberrorspackage.errors.Errorf("oh %q", "no")becomesfmt.Errorf("oh %q", "no")
It may even be somewhat possible to automate, using x/tools/go/analysis (see sigstore/cosign#1887 (comment)).
Let me know if you'd be interested in considering a PR to make this change.
bartekpacia and kolyshkin
Metadata
Metadata
Assignees
Labels
No labels