fstestutility

package
v1.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 11, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

fstestutility describes functions that are useful for tests

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertNoError

func AssertNoError(err error)

func CreateTemporaryFileWithData

func CreateTemporaryFileWithData(data string) (path string, cleanup func())

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

func MakeDirectory(pathParts ...string) string

MakeDirectory creates directory by path parts.

func MakeTempDirectory

func MakeTempDirectory(pattern string) (directoryPath string, cleanup func())

MakeTempDirectory creates temporary directory by pattern and returns cleanup function.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL