MCPcopy
hub / github.com/uber-go/goleak / IgnoreAnyFunction

Function IgnoreAnyFunction

options.go:80–84  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

78//
79// go.uber.org/goleak.(*MyType).MyMethod
80func 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.

Callers 2

TestOptionsFiltersFunction · 0.85

Calls 2

addFilterFunction · 0.85
HasFunctionMethod · 0.80

Tested by 2

TestOptionsFiltersFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…