Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func Call ¶
Call calls a func() hook if present.
TestHooks should be used very sparingly, see comment on TestHooks.
func CallCtx ¶ added in v1.29.0
CallCtx calls a func(context.Context) hook if present.
TestHooks should be used very sparingly, see comment on TestHooks.
Types ¶
type TestHooks ¶
type TestHooks struct{}
TestHooks (in production mode) is an empty struct just so the build works. See TestHooks in test_impl.go.
TestHooks are an inherently unclean way of writing tests. They require mixing test-only concerns into production code. In general you should prefer other ways of writing tests wherever possible, and only use TestHooks sparingly, as a last resort.
Click to show internal directories.
Click to hide internal directories.