Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TempFile ¶ added in v3.3.0
TempFile ensures a temp file for unit testing purposes.
It returns the path to the directory (to which you will still need to join the filename)
The returned directory is automatically removed when the test and all its subtests complete.
tempdir := TempFile(t, "foo", []byte("bar")) filename := filepath.Join(tempdir, "foo")
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.