Re-use node
variable
Signed-off-by: Jesse Szwedko <jesse@szwedko.me>
This commit is contained in:
parent
ee0756044c
commit
72dc91db74
@ -35,11 +35,10 @@ func nestedVal(name string, tree map[interface{}]interface{}) (interface{}, bool
|
||||
|
||||
switch child := child.(type) {
|
||||
case map[string]interface{}:
|
||||
m := make(map[interface{}]interface{}, len(child))
|
||||
node = make(map[interface{}]interface{}, len(child))
|
||||
for k, v := range child {
|
||||
m[k] = v
|
||||
node[k] = v
|
||||
}
|
||||
node = m
|
||||
case map[interface{}]interface{}:
|
||||
node = child
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user