Documentation ¶
Index ¶
- func WithDefaultBool(key string, def bool) bool
- func WithDefaultDuration(key string, def time.Duration) time.Duration
- func WithDefaultFloat64(key string, def float64) float64
- func WithDefaultInt(key string, def int) int
- func WithDefaultInt64(key string, def int64) int64
- func WithDefaultString(key string, def string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithDefaultBool ¶
WithDefaultBool returns the boolean value of the supplied environment variable or, if not present, the supplied default value.
func WithDefaultDuration ¶
WithDefaultDuration returns the duration value of the supplied environment variable or, if not present, the supplied default value.
func WithDefaultFloat64 ¶
WithDefaultFloat64 returns the float64 value of the supplied environment variable or, if not present, the supplied default value. If the float64 conversion fails, returns the default
func WithDefaultInt ¶
WithDefaultInt returns the int value of the supplied environment variable or, if not present, the supplied default value. If the int conversion fails, returns the default
func WithDefaultInt64 ¶
WithDefaultInt64 returns the int value of the supplied environment variable or, if not present, the supplied default value. If the int conversion fails, returns the default
func WithDefaultString ¶
WithDefaultString returns the string value of the supplied environment variable or, if not present, the supplied default value.
Types ¶
This section is empty.