blob: b2d2f41d4f5ecf2b2d13d4b89d8beabc532998e2 [file] [log] [blame]
package env
import "testing"
var t = &testing.T{}
// Patch an environment variable and defer to return to the previous state
func ExamplePatch() {
defer Patch(t, "PATH", "/custom/path")()
}
// Patch all environment variables
func ExamplePatchAll() {
defer PatchAll(t, map[string]string{
"ONE": "FOO",
"TWO": "BAR",
})()
}