From 4f738d6f3f12193b509ba28f6dd79766be34944e Mon Sep 17 00:00:00 2001 From: cmohrb Date: Wed, 22 Aug 2018 11:28:42 +0200 Subject: [PATCH] insensitivise slices of maps when reading from config file --- util.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/util.go b/util.go index 952cad4..76b147f 100644 --- a/util.go +++ b/util.go @@ -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)