tempfile

package
v1.13.1 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2017 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TempFile

type TempFile struct {
	File *os.File
}

TempFile is a temporary file that can be used with unit tests. TempFile reduces the boilerplate setup required in each test case by handling setup errors.

func NewTempFile

func NewTempFile(t assert.TestingT, prefix string, content string) *TempFile

NewTempFile returns a new temp file with contents

func (*TempFile) Name

func (f *TempFile) Name() string

Name returns the filename

func (*TempFile) Remove

func (f *TempFile) Remove()

Remove removes the file

Jump to

Keyboard shortcuts

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