Package env provides functions to test code that read environment variables or the current working directory.
func ChangeWorkingDir ¶
ChangeWorkingDir to the directory, and return a function which restores the previous working directory.
Patch changes the value of an environment variable, and returns a function which will reset the the value of that variable back to the previous state.
Patch an environment variable and defer to return to the previous state
PatchAll sets the environment to env, and returns a function which will reset the environment back to the previous state.
Patch all environment variables