Remove obsolete github.com/pkg/errors dependency, and drop golang.org/x/sys - #52
Merged
Conversation
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.
Dhiver
approved these changes
Aug 28, 2026
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.
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 theRLIMIT, which was required for tests before kernel 5.11. But CI runs on a more recent kernel, so that doesn't matter.