Documentation ¶
Overview ¶
Package configurator implements a simple library for loading configurations.
The library overrides values in a default configuration from the following sources listed in increasing precedence.
A yaml configuration file (default, application specified, or passed with -config command line flag).
From environmental variables, optionally with an application specific prefix. Currently the library only support loading int and string type values.
The goal is to gracefully handle enough common cases with minimal dependencies and complexity. Getting a configuration loaded should be as simple as am single function call.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadConfig ¶
LoadConfig takes a default configuration and updates it with values specified in a file or passed through the environment. config must be a pointer to a struct and should contain the default configuration values.
Types ¶
This section is empty.