Skip to content

Commit

Permalink
Convert for strings.ToLower to strings.EqualFold as per linter
Browse files Browse the repository at this point in the history
  • Loading branch information
camielwnzl authored and mrueg committed Jul 19, 2024
1 parent 49ab5ab commit 8355d98
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ func determineLabelsToRemove(labelInfo *confluence.LabelInfo, meta *mark.Meta) [
var labels []string
for _, label := range labelInfo.Labels {
if !slices.ContainsFunc(meta.Labels, func(metaLabel string) bool {
return strings.ToLower(metaLabel) == strings.ToLower(label.Name)
return strings.EqualFold(metaLabel, label.Name)
}) {
labels = append(labels, label.Name)
}
Expand All @@ -596,7 +596,7 @@ func determineLabelsToAdd(meta *mark.Meta, labelInfo *confluence.LabelInfo) []st
var labels []string
for _, metaLabel := range meta.Labels {
if !slices.ContainsFunc(labelInfo.Labels, func(label confluence.Label) bool {
return strings.ToLower(label.Name) == strings.ToLower(metaLabel)
return strings.EqualFold(label.Name, metaLabel)
}) {
labels = append(labels, metaLabel)
}
Expand Down

0 comments on commit 8355d98

Please sign in to comment.