package testutil

import "github.com/spf13/viper/internal/testutil"

Index

Functions

func AbsFilePath

func AbsFilePath(t *testing.T, path string) string

AbsFilePath calls filepath.Abs on path.

func Setenv

func Setenv(t *testing.T, name, val string)

Setenv sets an environment variable to a temporary value for the duration of the test.

This shim can be removed once support for Go <1.17 is dropped.

Source Files

env_go1_17.go filepath.go

Version
v1.10.1
Published
Dec 15, 2021
Platform
linux/amd64
Imports
2 packages
Last checked
59 minutes ago

Tools for package owners.