The second episode of the miniseries on program analysis covers go/scanner and ASTs to answer a similar question to the previous episode.
What is the most common name, but this time not for all identifiers but comparing those of local variables versus those that are defined at package leve.
- go/parser: https://golang.org/pkg/go/parser
- go/ast: https://golang.org/pkg/go/ast
- go-spew: https://github.com/davecgh/go-spew