Package config contains a handful of useful functions to load to configuration structs from JSON files or environment variables.
The subpackages contain structs meant for managing common configuration options and credentials. There are currently configs for:
* Go Kit Metrics * MySQL * PostgreSQL * AWS (S3, DynamoDB, ElastiCache)
const DefaultConfigLocation = "/opt/nyt/etc/conf.json"
DefaultConfigLocation is the default filepath for JSON config files.
var EnvAppName = ""
EnvAppName is used as a prefix for environment variable names when using the LoadXFromEnv funcs. It defaults to empty.
LoadJSONFile is a helper function to read a config file into whatever config struct you need. For example, your custom config could be composed of one or more of the given Config, AWS, MySQL, Oracle or MongoDB structs.
SetFlagOverrides will add and check a `log` and `config` CLI flag to the current process, call flag.Parse() and will overwrite the passed in string pointer if the flag exists.
SetLogOverride will check `*LogCLI` for any values and override the given string pointer if LogCLI is set. If LogCLI is set to "dev", the given log var will be set to "".