env

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package env manages the loading of environment variables. Variables are first searched for in an in-memory stack, then in a file `env.yaml` in the current working directory, and finally in the OS.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(key string) string

Get returns the value of the environment variable. It looks first in the in-memory stack, then in env.yaml file, and finally in the OS variables. Environment value keys are case-sensitive.

func Lookup

func Lookup(key string) (string, bool)

Lookup returns the value of the environment variable. It looks first in the in-memory stack, then in env.yaml file, and finally in the OS variables. Environment value keys are case-sensitive.

func Pop

func Pop(key string)

Pop pops the last value pushed to the in-memory stack. Pushing and popping to the stack is valuable in tests. Environment value keys are case-sensitive.

func Push

func Push(key string, value string)

Push pushes a new value to the in-memory stack. Pushing and popping to the stack is valuable in tests. Environment value keys are case-sensitive.

Types

This section is empty.

Jump to

Keyboard shortcuts

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