[#1939] removed redundant COALESCE normalizations

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

No files matched your search

+2 -4
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])
}