Documentation
¶
Overview ¶
fstestutility describes functions that are useful for tests
Index ¶
- func AssertNoError(err error)
- func CreateTemporaryFileWithData(data string) (path string, cleanup func())
- func CreateTemporaryFiles(patterns ...*string) (cleanup func())
- func GetAvailableTempPath() string
- func MakeDirectory(pathParts ...string) string
- func MakeTempDirectory(pattern string) (directoryPath string, cleanup func())
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertNoError ¶
func AssertNoError(err error)
func CreateTemporaryFileWithData ¶
CreateTemporaryFileWithData Creates a file with given data. It returns path to file and a cleanup function.
func CreateTemporaryFiles ¶
func CreateTemporaryFiles(patterns ...*string) (cleanup func())
CreateTemporaryFiles creates files by the patterns (* for random substitution). It changes the patterns parameters to the paths. It returns a cleanup function.
func GetAvailableTempPath ¶
func GetAvailableTempPath() string
GetAvailableTempPath returns path to available (nonexistent) temporary file.
func MakeDirectory ¶
MakeDirectory creates directory by path parts.
func MakeTempDirectory ¶
MakeTempDirectory creates temporary directory by pattern and returns cleanup function.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.