Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetValuesFromEnvironment ¶
func SetValuesFromEnvironment(prefix string, config interface{})
SetValuesFromEnvironment iterates over the struct and checks if environment variables were set. It will transform the name of the field to upper and join the the prefix with an _. The resulting string will be looked up with os.Getenv if found it will set the value of the struct member to the value from the env var.
func SetValuesFromEnvironmentTag ¶
func SetValuesFromEnvironmentTag(config interface{})
SetValuesFromEnvironmentTag iterates over the struct and checks for "env" tags. If an "env" tag was found, it will set the value of the struct member to the value from the specified env var.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.