var doc … var Analyzer … var canonicalMethods … func run(pass *analysis.Pass) (interface{ … } func canonicalMethod(pass *analysis.Pass, id *ast.Ident) { … } func typeString(typ types.Type) string { … } func argjoin(x []string) string { … } // Does each type in expect with the given prefix match the corresponding type in actual? func matchParams(pass *analysis.Pass, expect []string, actual *types.Tuple, prefix string) bool { … } // Does this one type match? func matchParamType(expect string, actual types.Type) bool { … } var errorType … func implementsError(actual types.Type) bool { … }