Skip to content

Commit fec23c2

Browse files
authored
chore: use strings.EqualFold instead (#1560)
1 parent 7672d68 commit fec23c2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pkg/brownfield/targets.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ func (t Target) IsBlacklisted(blacklist TargetBlacklist) bool {
3434
// An empty blacklist hostname indicates that any hostname would be blacklisted.
3535
// If host names match - this target is in the blacklist.
3636
// AGIC is allowed to create and modify App Gwy config for blank host.
37-
hostIsBlacklisted := blTarget.Hostname == "" || strings.ToLower(t.Hostname) == strings.ToLower(blTarget.Hostname)
37+
hostIsBlacklisted := blTarget.Hostname == "" || strings.EqualFold(t.Hostname, blTarget.Hostname)
3838

3939
pathIsBlacklisted := blTarget.Path == "" || blTarget.Path == "/*" || t.Path.lower() == blTarget.Path.lower() || blTarget.Path.contains(t.Path) // TODO(draychev): || t.Path.contains(blTarget.Path)
4040

pkg/controller/helpers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ func isSlice(v interface{}) bool {
136136
func deleteKey(m *map[string]interface{}, keyToDelete string) {
137137
// Recursively search for the given keyToDelete
138138
for k, v := range *m {
139-
if strings.ToLower(k) == strings.ToLower(keyToDelete) {
139+
if strings.EqualFold(k, keyToDelete) {
140140
delete(*m, k)
141141
continue
142142
}

0 commit comments

Comments
 (0)