Documentation
¶
Overview ¶
Package env provides environment variable helpers that support OPENAUDIO_-prefixed canonical names with fallback to legacy names.
Convention: always pass the OPENAUDIO_ key first, then any legacy key(s). The first key that is set wins; if none are set, the default is returned.
Index ¶
- func Bool(keys ...string) bool
- func Get(defaultValue string, keys ...string) string
- func GetDuration(defaultValue time.Duration, keys ...string) time.Duration
- func GetInt(defaultValue int, keys ...string) int
- func IsSet(keys ...string) bool
- func Lookup(keys ...string) (string, bool)
- func String(keys ...string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Get ¶
Get returns the value of the first set environment variable from keys, or defaultValue if none are set.
func GetDuration ¶
GetDuration returns the duration value of the first set environment variable. If the value cannot be parsed, defaultValue is returned.
func GetInt ¶
GetInt returns the integer value of the first set environment variable. If the value cannot be parsed, defaultValue is returned.
Types ¶
This section is empty.