Documentation ¶
Index ¶
- func Environ() []string
- func Get(key, defaultValue string) string
- func GetInt(key string, defaultValue int) (int, error)
- func IsSet(key string) bool
- func List(prefix string) (envs []string)
- func LockSetEnv() func()
- func LookupEnv(key string) (string, string, string, error)
- func RegisterGlobalCAs(CAs *x509.CertPool)
- func SetEnvOff()
- func SetEnvOn()
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 ¶
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 GetInt ¶
GetInt returns an integer if found in the environment and returns the default value otherwise.
func LockSetEnv ¶
func LockSetEnv() func()
LockSetEnv locks modifications to environment. Call returned function to unlock.
func LookupEnv ¶
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. In this case, it also returns the credentials username and password
func RegisterGlobalCAs ¶
RegisterGlobalCAs register the global root CAs
Types ¶
This section is empty.