mozilla-services/pushgo — pull request #84 by kitcambridge (2014-09-12 17:56:25+00:00)
Title: Allow config overrides via environment variables

* `Load{ConfigForSection, ExtensibleSection}()` now override TOML config values with values extracted from environment variables. All options, including extensible section fields, can be overridden.
* Overrides are specified via `PUSHGO_`-prefixed, case-insensitive variable names.
* `Environment.Unmarshal()` uses reflection to decode configuration overrides. Integers, floats, and booleans are decoded via `Parse{Int, Uint, Float, Bool}`. Strings are represented as-is. Slices are decoded as comma-separated lists.
* Nested struct fields serve as section names, and are decoded recursively.
* The `env:` tag indicates the environment variable name, and defaults to the field name if unspecified.