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.14.0
Published
Nov 6, 2022
Platform
linux/amd64
Imports
2 packages
Last checked
1 hour ago

Tools for package owners.