Skip to content

Replace pkg/errors with fmt.Errorf#1

Merged
fanyang89 merged 6 commits intomainfrom
codex
Feb 10, 2026
Merged

Replace pkg/errors with fmt.Errorf#1
fanyang89 merged 6 commits intomainfrom
codex

Conversation

@fanyang89
Copy link
Collaborator

Motivation

  • Standardize error wrapping to use the Go standard library instead of the deprecated github.com/pkg/errors usage across the codebase.
  • Reduce external dependency surface by removing pkg/errors from module requirements.

Description

  • Replaced errors.Wrap(err, "...") with fmt.Errorf("...: %w", err) across command handlers and parsers in cmd_mem.go, cmd_net.go, cmd_proc.go, cmd_syscall.go, cmd_vfs.go, cmd_vfs_raw.go, and parser.go.
  • Replaced errors.Errorf uses with fmt.Errorf where present.
  • Removed github.com/pkg/errors from go.mod and removed its entries from go.sum.
  • Adjusted imports to rely on the standard fmt and errors packages where appropriate and ran gofmt to format changes.

Testing

  • No automated tests were executed for this change.

Codex Task

chatgpt-codex-connector[bot]

This comment was marked as outdated.

@fanyang89
Copy link
Collaborator Author

@codex review

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. Nice work!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@fanyang89 fanyang89 merged commit 3047ba5 into main Feb 10, 2026
1 check passed
@fanyang89 fanyang89 deleted the codex branch February 10, 2026 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant