Environment variables are another way to pass state into an application beyond reading data in from a file or passing it explicitly over the command line. This recipe will explore some very basic getting and setting of environment variables and then work with the highly useful third-party library https://github.com/kelseyhightower/envconfig.
We'll build an application that can read a config via JSON or through environment variables. The next recipe will further explore alternative formats, including TOML and YAML.