envtest

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Empty = Env{}

Empty returns an empty environment.

Functions

This section is empty.

Types

type Env

type Env struct {
	// contains filtered or unexported fields
}

Env represents a fake environment.

func MustPairs

func MustPairs(items ...string) *Env

MustPairs builds an Env with the provided items, panicking if it fails.

func Pairs

func Pairs(pairs ...string) (*Env, error)

Pairs builds a new fake environment with the provided pairs of items. There must be exactly an even number of items in the list.

func (*Env) Getenv

func (e *Env) Getenv(k string) string

Getenv is an analog for the os.Getenv operation.

Jump to

Keyboard shortcuts

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