What problem does it solve?
It reduces technical debt and bugs in Go projects by updating older patterns, deprecated APIs, and non-idiomatic code to modern Go language features and standard-library improvements.
Core Features & Use Cases
- Version-aware modernization: Detects the target Go version from go.mod/go.work and prioritizes changes for Go 1.21β1.26+ (with guidance for older targets).
- Safety-first and prioritized refactors: Emphasizes high-impact correctness and security fixes first (e.g., path traversal, crypto deprecations, vulnerability checks), then readability and maintainability improvements.
- Tooling and CI support: Recommends running golangci-lint modernize linter when available and suggests additional tooling updates (govulncheck, golangci-lint v2, CI modernization).
- Ignored-suggestion memory: Uses a project-level .modernize file to avoid re-suggesting previously ignored items.
- Use Case: When reviewing a PR on an existing Go service, it proactively flags outdated crypto, risky filesystem path handling, and missed standard-library improvements, then suggests minimal, context-relevant changes rather than broad refactors.
Quick Start
Ask the agent: review this Go code for modernization opportunities and propose the safest changes first for our current Go version.