Helper marks the calling function as a test helper function. When printing file and line information, that function will be skipped. Helper may be called simultaneously from multiple goroutines.
This is useful for tests that verify go routines at multiple points, so failures can be more easily distinguished.
Mark
VerifyNone(...)
as a testHelper
function, so that it reports the error at the call site, rather thanleaks.go:78:
.From the go docs:
This is useful for tests that verify go routines at multiple points, so failures can be more easily distinguished.