Use EqualFold ti avoid memory reallocations

This commit is contained in:
Dmitry
2023-06-17 16:46:39 +02:00
committed by quobix
parent a09916eb67
commit fa337646da
2 changed files with 3 additions and 2 deletions

View File

@@ -22,7 +22,7 @@ func FindItemInMap[T any](item string, collection map[KeyReference[string]]Value
if n.Value == item {
return &o
}
if strings.ToLower(n.Value) == strings.ToLower(item) {
if strings.EqualFold(item, n.Value) {
return &o
}
}