Help us shape the future of Go! Take the 2026 Go Developer Survey

configtest

package
v0.30.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 7, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var KnownLeakEnvironmentKeys = []string{
	snykAPIKey,
}

KnownLeakEnvironmentKeys is cleared when IsolateEnvironmentForTest is called with no arguments.

Functions

func IsolateEnvironmentForTest

func IsolateEnvironmentForTest(t *testing.T, keys ...string)

IsolateEnvironmentForTest clears environment variables for a test using t.Setenv(k, ""). If no keys are provided, it clears the variables listed in KnownLeakEnvironmentKeys. If explicit keys are provided, they OVERRIDE the default behavior: only the specified keys are cleared, and they are NOT merged with KnownLeakEnvironmentKeys. Empty keys are skipped.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL