IgnoreAnyFunction ignores goroutines where the specified function is present anywhere in the stack. The function name must be fully qualified, e.g., go.uber.org/goleak.IgnoreAnyFunction For methods, the fully qualified form looks like: go.uber.org/goleak.(*MyType).MyMethod
(f string)
| 78 | // |
| 79 | // go.uber.org/goleak.(*MyType).MyMethod |
| 80 | func IgnoreAnyFunction(f string) Option { |
| 81 | return addFilter(func(s stack.Stack) bool { |
| 82 | return s.HasFunction(f) |
| 83 | }) |
| 84 | } |
| 85 | |
| 86 | // Cleanup sets up a cleanup function that will be executed at the |
| 87 | // end of the leak check. |
searching dependent graphs…