iotest

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TempDir

func TempDir(t T, prefix string) string

TempDir creates a new temporary directory inside the current test context.

It deletes the directory when the test finishes.

func TempFile

func TempFile(t T, prefix string) *os.File

TempFile creates a new temporary file inside the current test context.

It deletes the file when the test finishes.

Types

type T

type T interface {
	Helper()
	Cleanup(func())
	Fatalf(string, ...interface{})
	Errorf(string, ...interface{})
}

T is a subset of the testing.T interface.

Jump to

Keyboard shortcuts

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