koding / multiconfig

Load configuration from multiple sources in Go
http://godoc.org/github.com/koding/multiconfig
MIT License
454 stars 64 forks source link

What is the priority of loading values? #78

Open sharonjl opened 5 years ago

sharonjl commented 5 years ago

In which order does the lib load values? Does the config file override command line flag?

markx commented 5 years ago

I believe it depends on what loader you use. For the default loader: https://github.com/koding/multiconfig/blob/master/multiconfig.go#L23-L24

If you don't like this default order, you can construct your own loader with whatever order you want.