Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDurationWithRange ¶
func GetDurationWithRange(envVar string, defaultValue, min, max time.Duration) (time.Duration, error)
GetDurationWithRange returns the time.Duration value of the environment variable specified by `envVar`. If the environment variable is not set, it returns `defaultValue`. If the value is set but is not valid (not a valid time.Duration or falls outside the specified range [minValue, maxValue] inclusively), it returns `defaultValue` and an error.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.