[#1939] removed redundant COALESCE normalizations

This commit is contained in:
Gani Georgiev
2023-03-23 19:30:35 +02:00
parent 5cbdbf6c10
commit 67ecebe935
9 changed files with 81 additions and 44 deletions

View File

@@ -252,10 +252,8 @@ func extractNestedMapVal(m map[string]any, keys ...string) (any, error) {
return nil, fmt.Errorf("at least one key should be provided")
}
var result any
var ok bool
if result, ok = m[keys[0]]; !ok {
result, ok := m[keys[0]]
if !ok {
return nil, fmt.Errorf("invalid key path - missing key %q", keys[0])
}