goleak.IgnoreAnyFunction not working for rollbar-go #118
Answered
by
abhinav
sagarrohankar-bsft
asked this question in
Q&A
-
Hi, I'm trying to skip reporting rollbar goroutine like below:
but it still does report about the leak
What possibly wrong Im doing? |
Beta Was this translation helpful? Give feedback.
Answered by
abhinav
Nov 24, 2023
Replies: 1 comment 1 reply
-
Hey, @sagarrohankar-bsft, goleak.VerifyTestMain(m,
goleak.IgnoreAnyFunction("github.com/rollbar/rollbar-go.NewAsyncTransport.func1"),
goleak.IgnoreAnyFunction("github.com/rollbar/rollbar-go.NewAsyncTransport"),
) Also, note that Hope this helps! |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
sagarrohankar-bsft
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey, @sagarrohankar-bsft,
IgnoreAnyFunction
is an option. You have to pass it toVerifyTestMain
.Like so:
Also, note that
goleak.VerifyTestMain
will callm.Run()
for you, so it will never reach theos.Exit(testMain(m))
you've added there.Hope this helps!