package testutil
import "github.com/spf13/viper/internal/testutil"
Index ¶
Functions ¶
func Setenv ¶
Setenv sets an environment variable to a temporary value for the duration of the test.
At the end of the test (see "Deferred execution" in the package docs), the environment variable is returned to its original value.
func Unsetenv ¶
Unsetenv unsets an environment variable for the duration of a test.
Source Files ¶
- Version
- v1.9.0
- Published
- Sep 19, 2021
- Platform
- linux/amd64
- Imports
- 2 packages
- Last checked
- 2 hours ago –
Tools for package owners.