var doc … var Analyzer … var strict … func init() { … } func run(pass *analysis.Pass) (interface{ … } type span … // contains reports whether the position is inside the span. func (s span) contains(pos token.Pos) bool { … } // growSpan expands the span for the object to contain the source range [pos, end). func growSpan(spans map[types.Object]span, obj types.Object, pos, end token.Pos) { … } // checkShadowAssignment checks for shadowing in a short variable declaration. func checkShadowAssignment(pass *analysis.Pass, spans map[types.Object]span, a *ast.AssignStmt) { … } // idiomaticShortRedecl reports whether this short declaration can be ignored for // the purposes of shadowing, that is, that any redeclarations it contains are deliberate. func idiomaticShortRedecl(pass *analysis.Pass, a *ast.AssignStmt) bool { … } // idiomaticRedecl reports whether this declaration spec can be ignored for // the purposes of shadowing, that is, that any redeclarations it contains are deliberate. func idiomaticRedecl(d *ast.ValueSpec) bool { … } // checkShadowDecl checks for shadowing in a general variable declaration. func checkShadowDecl(pass *analysis.Pass, spans map[types.Object]span, d *ast.GenDecl) { … } // checkShadowing checks whether the identifier shadows an identifier in an outer scope. func checkShadowing(pass *analysis.Pass, spans map[types.Object]span, ident *ast.Ident) { … }