env

package
v0.151.0 Latest Latest
Warning

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

Go to latest
Published: May 11, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetEnv

func SetEnv(tb TB, key, value string)

SetEnv will set the os environment variable for the current program to a given value, and prepares a cleanup function to restore the original state of the environment variable.

Spec using this helper should be flagged with Spec.HasSideEffect or Spec.Sequential.

func UnsetEnv

func UnsetEnv(tb TB, key string)

UnsetEnv will unset the os environment variable value for the current program, and prepares a cleanup function to restore the original state of the environment variable.

Spec using this helper should be flagged with Spec.HasSideEffect or Spec.Sequential.

Types

type TB

type TB interface {
	Helper()
	Cleanup(func())
	Fatal(...any)
	Error(...any)
}

Jump to

Keyboard shortcuts

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