Skip to content

Drop dependency on github.com/pkg/errors#543

Open
alexandear wants to merge 1 commit into
palantir:developfrom
alexandear-org:chore/drop-pkg-errors
Open

Drop dependency on github.com/pkg/errors#543
alexandear wants to merge 1 commit into
palantir:developfrom
alexandear-org:chore/drop-pkg-errors

Conversation

@alexandear
Copy link
Copy Markdown

Before this PR

The project depended on github.com/pkg/errors for wrapping and formatting errors. This adds an extra external dependency for functionality that modern Go provides in the standard library. Keeping it also increases maintenance surface and dependency churn.

After this PR

All usages of github.com/pkg/errors were replaced with standard-library error handling (fmt.Errorf("...: %w", err) and errors where needed), and the module dependency was removed from go.mod.

==COMMIT_MSG==
Drop dependency on github.com/pkg/errors
==COMMIT_MSG==

Possible downsides?

  • If anyone relied on pkg/errors stack-trace formatting (for example, %+v behavior), that detail is no longer available from newly wrapped errors.
  • Error message text changed slightly in some places, which could affect brittle string-matching tests or log parsers.

@changelog-app
Copy link
Copy Markdown

changelog-app Bot commented May 8, 2026

Generate changelog in changelog/@unreleased

Type (Select exactly one)

  • Feature (Adding new functionality)
  • Improvement (Improving existing functionality)
  • Fix (Fixing an issue with existing functionality)
  • Break (Creating a new major version by breaking public APIs)
  • Deprecation (Removing functionality in a non-breaking way)
  • Migration (Automatically moving data/functionality to a new system)

Description

Drop dependency on github.com/pkg/errors

Check the box to generate changelog(s)

  • Generate changelog entry

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 this pull request may close these issues.

1 participant