var importAliases … var confirm … var regex … var isTerminal … var logPrefix … var aliases … type analyzer … func newAnalyzer() *analyzer { … } // collect extracts test metadata from a file. func (a *analyzer) collect(dir string) { … } func renameImportUsages(f *ast.File, old, new string) { … } func (a *analyzer) filterFiles(fs map[string]*ast.File) []*ast.File { … } type collector … // handlePath walks the filesystem recursively, collecting directories, // ignoring some unneeded directories (hidden/vendored) that are handled // specially later. func (c *collector) handlePath(path string, info os.FileInfo, err error) error { … } func main() { … }