Documentation ¶
Overview ¶
Package env provides helpers functions to load different variable types from the environment.
Index ¶
- func GetBoolOrDefault(name string, defaultV bool) bool
- func GetDurationOrDefault(name string, defaultV time.Duration) time.Duration
- func GetIntOrDefault(name string, defaultV int) int
- func GetStringOrDefault(name, defaultV string) string
- func Load(paths ...string) error
- func MustLoad(paths ...string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetBoolOrDefault ¶
GetBoolOrDefault value. Also returns the default value if the value is not a boolean.
func GetDurationOrDefault ¶
GetDurationOrDefault value. Also returns the default value if the value is not a time.Duration.
func GetIntOrDefault ¶
GetIntOrDefault value. Also returns the default value if the value is not an int.
func GetStringOrDefault ¶
GetStringOrDefault value.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.