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)
You must clean up the directory that is returned.
tempdir := TempFile(t, "foo", []byte("bar")) defer os.RemoveAll(tempdir) filename := filepath.Join(tempdir, "foo")
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.