Repository navigation
Replace pkg/errors with fmt.Errorf from stdlib - #2109
Merged
Seanstoppable merged 1 commit intoJul 23, 2026
Merged
Conversation
Remove direct dependency on the archived github.com/pkg/errors package by replacing errors.Wrap/Wrapf calls with fmt.Errorf using %w verb. Fixes wtfutil#1734
Seanstoppable
force-pushed
the
seanstoppable-replace-pkg-errors
branch
from
July 23, 2026 02:24
d7756d4 to
fb218c4
Compare
Seanstoppable
enabled auto-merge (squash)
July 23, 2026 02:24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Remove direct dependency on the archived
github.com/pkg/errorspackage by replacingerrors.Wrap/errors.Wrapfcalls withfmt.Errorfusing the%wverb (available since Go 1.13).Changes
modules/docker/client.go— replaced 3errors.Wrap/errors.Wrapfcallsmodules/docker/widget.go— replaced 1errors.Wrapcallmodules/azuredevops/client.go— replaced 1errors.Wrapcallmodules/azuredevops/widget.go— replaced 1errors.WrapcallAll
"github.com/pkg/errors"imports removed from these files.go mod tidyrun to clean up.Note on indirect dependency
pkg/errorsremains as an// indirectdependency ingo.modbecause two upstream libraries still use it:bitbucket.org/mikehouston/asana-go(used bymodules/asana) — the fork atgithub.com/kothar/asana-goalso has this issuegithub.com/adlio/trello(used bymodules/todo_plus) —pkg/errorshas been removed onmainbut no release has been tagged after v1.12.0Once these upstream dependencies release versions without
pkg/errors, updating them ingo.modwill fully eliminate the indirect dependency.Fixes #1734