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.8.0
- Published
- Jun 16, 2021
- Platform
- linux/amd64
- Imports
- 2 packages
- Last checked
- 59 minutes ago –
Tools for package owners.