How to use v1.1.0 Release Notes
Release Date: 2017-05-10 // almost 7 years ago-
👍 Now goconfig support environment variables in this precedence order:
default < config file < environment vars < cli args
For example, if my config struct is:
type Config struct { MyDatabase MongoConfig}type MongoConfig struct { Uri string `Mongo uri in mongodb://... format`Timeout int `Socket timeout the firs time`}
💻 The environment variable to change Uri is:
MYDATABASE_URI="mongodb://...."
and that value can be rewrited by equivalent command line argument:--mydatabase.uri mongodb://blahblah...