testutil

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2018 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChangeGoPath

func ChangeGoPath(path string) (string, error)

ChangeGoPath prepends `path` to GOPATH environment variable accounting for possibly for default value. Returns original value of the enviroment variable, don't forget to restore it with defer:

defer os.Setenv("GOPATH", origGoPath)

func WriteFile

func WriteFile(dir string, name string, text string) error

WriteFile dumps `text` into file named `name` into directory `dir`. Creates directory if needed as well as file

Types

This section is empty.

Jump to

Keyboard shortcuts

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