~/talk

Using and Writing Go Analyses

Talkat GopherCon UK 2019 · 2019-08-21..08-23· [developer-experience, go]
slides:none on file

Shows how to use the Analysis API (golang.org/x/tools/go/analysis) to write an analyzer that finds a real bug: passing a pointer where a value is expected and misusing equality checks. Demonstrates using inspect and type info to compare argument types, reporting precise diagnostics with file/offset, and generating suggested fixes that insert a dereference. Covers building a CLI with singlechecker and wiring the analyzer into gopls/go vet/staticcheck so fixes appear as editor quick fixes.

AI-written summary · about

  1. 0:00Introduction
  2. 0:32What are analyses
  3. 1:01Come package
  4. 2:57The problem
  5. 3:30The solution
  6. 4:55Go Analyzer
  7. 5:11Diagnostic
  8. 6:01Go Vet
  9. 6:58Analyse Configuration
  10. 7:42Syntax Types
  11. 13:56Analysis Steps
  12. 15:00Facts
  13. 15:37Go Docs
  14. 15:54Suggested fixes
  15. 18:21Fix pointer
  16. 22:34Single Checker
  17. 23:24Contribute
  18. 23:46Go Please
  19. 24:50Thank You
  20. 25:07GitHub
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.