Documentation
¶
Overview ¶
Package kit provides a set of packages and functions to help with testing.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddGlobalCleanup ¶ added in v0.29.0
func AddGlobalCleanup(fn func())
AddGlobalCleanup adds a global cleanup function.
Example usage:
// TestMain is the entry point for running tests in this package.
func TestMain(m *testing.M) {
// Run all tests and capture the exit code.
exitCode := m.Run()
// Cleanup code (runs after all tests).
kit.RunGlobalCleanups()
// Exit with the test result code.
os.Exit(exitCode)
}
func RunGlobalCleanups ¶ added in v0.29.0
func RunGlobalCleanups()
RunGlobalCleanups runs global cleanup functions. Guarantees cleanup functions are run only once.
func SHA1Reader ¶
SHA1Reader returns SHA1 hash off everything in the reader. Panics on error.
Types ¶
This section is empty.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package iokit provides I/O and buffer-related helpers.
|
Package iokit provides I/O and buffer-related helpers. |
|
Package timekit provides time.Time related helpers.
|
Package timekit provides time.Time related helpers. |
Click to show internal directories.
Click to hide internal directories.