testutils

package
v0.0.26 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2022 License: LGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloseAndRemoveTempFile

func CloseAndRemoveTempFile(t *testing.T, f *os.File)

CloseAndRemoveTempFile closes/removes the temp file. Errors are logged.

func NewTempFile

func NewTempFile(t *testing.T) *os.File

NewTempFile creates a new, empty temp file for testing. Errors are fatal.

func NewTempFileWithContents

func NewTempFileWithContents(t *testing.T, contents []byte) *os.File

NewTempFileWithContents creates a new, empty temp file for testing, with the given contents. The read/write offset is set to the beginning. Errors are fatal.

Types

This section is empty.

Jump to

Keyboard shortcuts

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