var doc … var Analyzer … func run(pass *analysis.Pass) (any, error) { … } var wantSuffix … // hasSuffix reports whether stack has the matching suffix, // considering only node types. func hasSuffix(stack, suffix []ast.Node) bool { … } // isMethodNamed reports whether f is a method with the specified // package, receiver type, and method names. func isMethodNamed(fn *types.Func, pkg, recv, name string) bool { … } // backindex is like [slices.Index] but from the back of the slice. func backindex[T any](slice []T, i int) T { … }