This skill acts as an expert consultant for the Go programming language, automatically detecting your project's Go version to provide context-aware code improvements. It helps transition legacy codebases to modern standards by replacing outdated patterns with high-performance built-ins, such as the slices and maps packages, type-safe atomics, and enhanced HTTP routing. By maintaining a comprehensive knowledge base of features from Go 1.0 up to Go 1.26, it ensures your code remains idiomatic, efficient, and compatible with your environment.
主要功能
01Applies cutting-edge Go 1.26 patterns like expressions in new() and errors.AsType.
0296 GitHub stars
03Modernizes legacy syntax with current built-ins like 'any', 'min/max', and 'clear'.
04Automatic Go version detection from go.mod files to ensure compatibility.
05Adopts Go 1.24+ standards including t.Context() for tests and omitzero JSON tags.
06Implements advanced Go 1.22+ features like range-over-integers and enhanced ServeMux.
使用场景
01Automating the migration of manual slice/map manipulations to the optimized slices and maps packages.
02Ensuring new code contributions adhere to the specific version constraints of a repository.
03Refactoring older Go services to utilize modern, more readable standard library functions.