Documentation ¶
Overview ¶
Package env provides utility functions for loading environment variables with defaults.
A common use of the env package is for combining flag with environment variables in a Go program.
Example:
func main() { var ( flProject = flag.String("http.addr", env.String("HTTP_ADDRESS", ":https"), "HTTP server address") ) flag.Parse() }
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Bool ¶
Bool returns the environment variable value specified by the key parameter, otherwise returning a default value if set.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.