testutil

package
v0.0.0-...-dca2ff9 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Detab

func Detab(str string) string

Detab removes whitespace from the front of a string on every line

Types

type TempFolder

type TempFolder struct {
	RootPath string
}

TempFolder is a temporary folder used for testing

func NewTempFolder

func NewTempFolder(namePrefix string) (*TempFolder, error)

NewTempFolder creates a new temporary folder

func (*TempFolder) Add

func (f *TempFolder) Add(fileName string, contents string) error

Add adds a file to a temp folder

func (*TempFolder) RemoveAll

func (f *TempFolder) RemoveAll() error

RemoveAll purges a TempFolder

Jump to

Keyboard shortcuts

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