Categories
0 pages
config
Layered configuration for Go, pulled out of go-tool-base so anything can use it. It reads your settings from files (in whatever format), the environment, flags and remote systems like Consul, and merges them with a precedence you can read off the call site. The part that sets it apart: it writes changes back without wrecking the file a person wrote, comments and all, and it can tell you exactly which source set any value. Around it sits a family of small adapter modules, one per format and one per backend, so you only carry the ones you actually use.