Documentation
¶
Index ¶
- Constants
- func Get(key string) (string, error)
- func GetAll(filenames ...string) (map[string]string, error)
- func GetValOrDefault(key, defaultVal string) string
- func Load(filenames ...string) error
- func ParseBool(key string) (bool, error)
- func ParseInt(key string) (int, error)
- func ParseTimeDuration(key string) (time.Duration, error)
Constants ¶
View Source
const ( Dev = "dev" Prod = "prod" Staging = "staging" )
Variables ¶
This section is empty.
Functions ¶
func GetValOrDefault ¶
Same as Get, but with default value.
func Load ¶
Loads environment variables from the given files. It is intented to be used in development mode. If in dev mode, make sure to load the env vars first, then call other funcs.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.