4
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2025-06-26 23:29:25 +00:00

Add environment override back

This commit is contained in:
Wim
2018-02-27 21:58:44 +01:00
parent 2bac867382
commit 2110db6f0c
2 changed files with 5 additions and 1 deletions

View File

@ -225,7 +225,9 @@ func OverrideCfgFromEnv(cfg *Config, protocol string, account string) {
if res != "" {
fieldVal := protoStruct.Field(i)
if fieldVal.Kind() == reflect.String {
log.Printf("config: overriding %s from env with %s\n", key, res)
log.WithFields(log.Fields{
"prefix": "config",
}).Infof("overriding %s from env with %s\n", key, res)
fieldVal.Set(reflect.ValueOf(res))
}
}