Using and Writing Go Analyses
summary
The new analysis framework golang.org/x/tools/go/analysis provides a reusable Analyzer value, an Inspect-based traversal and types.Info mapping, and a singlechecker main so you can build a command-line checker; example analyzer detects cmp.Equal called with mismatched argument types, reports Diagnostics, uses facts to tag functions and offers suggested fixes that editors via gopls apply as quick fixes, and includes a testing harness for verifier tests.
AI-written summary · about
chapters (13)
- 0:00Introduction
- 0:42What are analyses
- 6:15Vet and Static Check
- 7:15Writing an Analysis
- 15:39Steps to Write an Analysis
- 16:09Facts
- 18:02Fact
- 19:31Suggested fixes
- 24:01Pointer to
- 26:24Report with fixes
- 26:58Command line tool
- 27:57Go Please
- 29:06Library Specific Analyzer








