Releases: fulldump/goconfig
Releases · fulldump/goconfig
v1.6.1 minoring
Eighteventhus
Features
- Support
time.Duration
thanks to @sedalu
Seventhus
vSixthus
Sixthus
Fifthus
Thirdus
Secondus
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...