What problem does it solve?
Modernize legacy Go codebases that still use pre-generics idioms, manual slice/map utilities, unstructured logging, and outdated error handling so they safely adopt newer language features and standard library improvements.
Core Features & Use Cases
- Generics migration: Replace interface{} utilities with type parameters for type-safe containers and helpers.
- Structured logging: Migrate ad-hoc log.Printf usage to log/slog for structured logs where appropriate.
- Error and collection utilities: Replace manual error accumulation with errors.Join and hand-written slice/map loops with slices/maps helpers.
- Language idioms: Convert classic for-loop patterns to range-over-int and adopt iterators where available.
- Use Case: Upgrade a service repository from Go 1.16 to Go 1.22+ by updating go.mod, replacing utility code with stdlib features, and following the verification checklist.
Quick Start
Ask the agent to modernize the repository to Go 1.22+, replacing interface{} utilities with generics, switching log.Printf to slog where suitable, using errors.Join for aggregated errors, and applying slices and maps helpers as recommended.