Analysis and Transformation Tools for Go Codebase Modernization
summary
Reports progress on the Go analysis framework used by cmd/vet and gopls, shows a suite of 20 modernizers that suggest-and-fix small API and idiom upgrades, and describes a source-level inliner (about 7,000 lines) that safely rewrites calls annotated with a gofix inline comment. Experiments find LLMs ignore new features across ~20 cases, many handcrafted modernizers contain subtle bugs, and the inliner proves reliable enough for mass automated fixes when integrated into go fix/go tools.
AI-written summary · about
chapters (7)
- 0:00Introduction to code modernization
- 0:34The case for modernizing Go
- 3:54Modernization and AI challenges
- 7:23Building modernization tools
- 12:00Lessons learned from analyzers
- 17:14The auto-inliner approach
- 22:17Summary and future directions








