Skip to content

Remove obsolete github.com/pkg/errors dependency, and drop golang.org/x/sys - #52

Merged
arthurfabre merged 2 commits into
masterfrom
afabre/deps
Aug 28, 2026
Merged

Remove obsolete github.com/pkg/errors dependency, and drop golang.org/x/sys#52
arthurfabre merged 2 commits into
masterfrom
afabre/deps

Conversation

@arthurfabre

Copy link
Copy Markdown
Collaborator

This drops two unneeded dependencies:

  • github.com/pkg/errors: suitable error handling is now in the go standard library.
  • golang.org/x/sys: we only needed it to set the RLIMIT, which was required for tests before kernel 5.11. But CI runs on a more recent kernel, so that doesn't matter.

Golang's standard library now has good support for errors, switch to
using it so we can drop the github.com/pkg/errors dependency.
We used golang.org/x/sys in only two places:

- For raising the RLIMIT in tests. This isn't required anymore as of
  kernel 5.11, so can stop doing it.
- For attaching the socket filter to a unix socket. But this is also
  trivially doable with the syscall package.

This removes the direct dependency on golang.org/x/sys: one less thing
for us to go update.
@arthurfabre arthurfabre self-assigned this Aug 27, 2026
@arthurfabre
arthurfabre merged commit e512fd5 into master Aug 28, 2026
10 checks passed
@arthurfabre
arthurfabre deleted the afabre/deps branch August 28, 2026 08:29
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.

2 participants