tempfile

package
v0.6.3-0...-140fefd Latest Latest
Warning

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

Go to latest
Published: May 4, 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 require.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