Documentation
¶
Overview ¶
Package env has simple functions for environment variables manipulation
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnvAsBool ¶
EnvAsBool returns the envKey as bool or the default value if missing (eq "") Panics if the value of the envKey is NOT a bool (parsing with strconv.ParseBool)
func EnvAsInt ¶
EnvAsInt returns the envKey as int or the default value if missing (eq "") Panics if the value of the envKey is NOT an integer
func EnvOrDefault ¶
EnvOrDefault will return the value of the environment variable key (envKey), or if not found (eq "") returns the default (defaultVal)
func MustEnv ¶
MustEnv will return the value of the environment variable key (envKey) or panic if this is not found (eq "")
func MustEnvAsBool ¶
MustEnvAsBool returns the envKey as bool Panics if envKey is NOT set Panics if the value of the envKey is NOT a bool (parsing with strconv.ParseBool)
func MustEnvAsInt ¶
MustEnvAsInt returns the envKey as int or panics if missing (eq "") Panics if the value of the envKey is NOT an integer
Types ¶
This section is empty.