env

package
v0.0.0-...-082243b Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Environ

func Environ() []string

Environ returns a copy of strings representing the environment, in the form "key=value".

func Get

func Get(key, defaultValue string) string

Get retrieves the value of the environment variable named by the key. If the variable is present in the environment the value (which may be empty) is returned. Otherwise it returns the specified default value.

func IsSet

func IsSet(key string) bool

IsSet returns if the given env key is set.

func List

func List(prefix string) (envs []string)

List all envs with a given prefix.

func LookupEnv

func LookupEnv(key string) (string, bool)

LookupEnv retrieves the value of the environment variable named by the key. If the variable is present in the environment the value (which may be empty) is returned and the boolean is true. Otherwise the returned value will be empty and the boolean will be false.

Additionally if the input is env://username:password@remote:port/ to fetch ENV values for the env value from a remote server.

func RegisterGlobalCAs

func RegisterGlobalCAs(CAs *x509.CertPool)

RegisterGlobalCAs register the global root CAs

func SetEnvOff

func SetEnvOff()

SetEnvOff - turns off env lookup

func SetEnvOn

func SetEnvOn()

SetEnvOn - turns on env lookup

Types

This section is empty.

Jump to

Keyboard shortcuts

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