Merge branch 'master' into read_tls_config

This commit is contained in:
Bernd Verst 2023-01-24 10:45:32 -08:00 committed by GitHub
commit 6656fdbf7a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -125,8 +125,12 @@ func TryGetQueryIndexName(props map[string]string) (string, bool) {
// GetMetadataProperty returns a property from the metadata map, with support for aliases
func GetMetadataProperty(props map[string]string, keys ...string) (val string, ok bool) {
lcProps := make(map[string]string, len(props))
for k, v := range props {
lcProps[strings.ToLower(k)] = v
}
for _, k := range keys {
val, ok = props[k]
val, ok = lcProps[strings.ToLower(k)]
if ok {
return val, true
}