Merge pull request #3813 from usabilla/merge-values

Removes unnecessary if block
pull/3829/head
Taylor Thomas 7 years ago committed by GitHub
commit 9654c616c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -313,11 +313,6 @@ func mergeValues(dest map[string]interface{}, src map[string]interface{}) map[st
dest[k] = v dest[k] = v
continue continue
} }
// If the key doesn't exist already, then just set the key to that value
if _, exists := dest[k]; !exists {
dest[k] = nextMap
continue
}
// Edge case: If the key exists in the destination, but isn't a map // Edge case: If the key exists in the destination, but isn't a map
destMap, isMap := dest[k].(map[string]interface{}) destMap, isMap := dest[k].(map[string]interface{})
// If the source map has a map for this key, prefer it // If the source map has a map for this key, prefer it

Loading…
Cancel
Save