Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FatalIfNil ¶
Helper to use 1 line rather than 3-lines block: ```
if err != nil { t.Fatal(err) }
``` in unit test functions.
func RemoveDir ¶
Removes the directory at the passed path. If deletion fails, `removeDir` terminates the test by calling Fatal.
func TempDir ¶
Creates a temporary directory for the test to use returning its path. Each subsequent call creates a unique directory; if the directory creation fails, `tempDir` terminates the test by calling Fatal.
Similar to https://pkg.go.dev/testing#T.TempDir without the cleanup part. testing#T.TempDir cannot be used as it was introduced in go 1.15.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.