Documentation
¶
Index ¶
Constants ¶
View Source
const ( // LogLevel is the environment variable name for the log level. LogLevel = "LOG_LEVEL" DevLogLevel = "dev" TestLogLevel = "test" ProdLogLevel = "prod" )
Variables ¶
This section is empty.
Functions ¶
func GetLogLevel ¶ added in v0.12.1
func GetLogLevel() string
GetLogLevel reads LOG_LEVEL from the environment and falls back to DevLevel if invalid.
Types ¶
type Map ¶
Map is a map of environment variables. We use a *Var as map values are not addressable, i.e. cannot be modified directly.
type Var ¶
type Var struct {
Value string
DefaultValue string
IsInteger bool
IntValue int
IsBoolean bool
BooleanValue bool
OneOf []string
Optional bool // controls whether an env variable can be missing from the .env file but still declared
}
Var describes an environment variable and its configuration.
Click to show internal directories.
Click to hide internal directories.