Build Your Own Tools to Refactor Go Safely
summary
Built a terminal tool that parses Go with go/parser and the AST, computes a checksum per top‑level declaration and renders canonical text to detect moved code, and presents results in a TUI move‑check that compares top‑level decl checksums. The generator LLM writes most of the Go analyzer and TUI but sometimes hallucinates functions or bad whitespace so manual fixes are required. The tool handles a ~4,000 line refactor and runs in under a second for large edits, and humans must approve changes.
AI-written summary · about
chapters (9)
- 0:00Introduction and context
- 3:16The problem of refactoring
- 6:59Parsing with Go
- 12:12Abstract Syntax Trees
- 17:51Building a custom review tool
- 23:17Learnings from AI-assisted dev
- 32:11Automating refactoring tasks
- 37:37Go fix analysis
- 45:56Conclusion and Q&A








