[lint-monster] Use strings.EqualFold for Case-Insensitive Comparison
Status
Issue Count: 18 instances
Last Updated: 2026-06-05
Overview
Replace manual case-insensitive string comparisons using strings.ToLower/ToUpper with the more efficient and idiomatic strings.EqualFold function.
Pattern
Current (inefficient):
strings.ToLower(a) == strings.ToLower(b)
strings.ToUpper(a) == strings.ToUpper(b)
Recommended (idiomatic):
Benefits:
- Avoids unnecessary string allocations
- More readable and idiomatic Go code
- Better Unicode handling
Affected Files
| File |
Instances |
Scope |
| pkg/cli/forecast.go |
2 |
lines 462 |
| pkg/workflow/resolve.go |
4 |
lines 173, 189, 227 |
| pkg/parser/yaml_import.go |
2 |
line 39 |
| pkg/workflow/strings.go |
1 |
line 224 |
| pkg/parser/schema_suggestions.go |
1 |
line 666 |
| pkg/workflow/notify_comment.go |
1 |
line 630 |
| pkg/workflow/features.go |
2 |
lines 69, 105 |
| pkg/workflow/repo_memory_validation.go |
1 |
line 52 |
| pkg/cli/codespace.go |
1 |
line 17 |
| pkg/cli/import_url_fetcher.go |
1 |
line 218 |
| pkg/cli/add_workflow_resolution.go |
1 |
line 459 |
| pkg/cli/outcome_eval_review.go |
1 |
line 79 |
Refactoring Checklist
Validation
All EqualFold findings should resolve.
Generated by 🧌 LintMonster · 177 AIC · ◷
[lint-monster] Use strings.EqualFold for Case-Insensitive Comparison
Status
Issue Count: 18 instances
Last Updated: 2026-06-05
Overview
Replace manual case-insensitive string comparisons using
strings.ToLower/ToUpperwith the more efficient and idiomaticstrings.EqualFoldfunction.Pattern
Current (inefficient):
Recommended (idiomatic):
Benefits:
Affected Files
Refactoring Checklist
strings.EqualFoldmake golint-custommake build && make fmtValidation
All EqualFold findings should resolve.