Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IdentifyLeaks ¶ added in v1.0.5
func IdentifyLeaks(opts *VerifyOpts) error
IdentifyLeaks looks for extra goroutines, and returns a descriptive error if it finds any.
func VerifyNoLeaks ¶
func VerifyNoLeaks(t testing.TB, opts *VerifyOpts)
VerifyNoLeaks calls IdentifyLeaks and fails the test if it finds any leaked goroutines.
Types ¶
type Stack ¶
type Stack struct {
// contains filtered or unexported fields
}
Stack represents a single Goroutine's stack.
func GetCurrentStack ¶ added in v1.0.8
func GetCurrentStack() Stack
GetCurrentStack returns the stack for the current goroutine.
type VerifyOpts ¶
type VerifyOpts struct { // Excludes is a list of strings that will exclude a stack from being considered a leak. Excludes []string }
VerifyOpts contains
func (*VerifyOpts) ShouldSkip ¶
func (opts *VerifyOpts) ShouldSkip(s Stack) bool
ShouldSkip returns whether the given stack should be skipped when doing verification.
Click to show internal directories.
Click to hide internal directories.