insensitivise slices of maps when reading from config file

This commit is contained in:
cmohrb 2018-08-22 11:28:42 +02:00
parent 8e90aaafac
commit 4f738d6f3f

View file

@ -76,6 +76,13 @@ func insensitiviseMap(m map[string]interface{}) {
case map[string]interface{}:
// nested map: recursively insensitivise
insensitiviseMap(val.(map[string]interface{}))
case []interface{}:
for _, x := range val.([]interface{}) {
y, ok := x.(map[string]interface{})
if ok {
insensitiviseMap(y)
}
}
}
lower := strings.ToLower(key)