Skip to content

[lint-monster] Use strings.EqualFold for Case-Insensitive Comparison #37047

@github-actions

Description

@github-actions

[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):

strings.EqualFold(a, b)

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

  • Update all 18 instances to use strings.EqualFold
  • Verify with make golint-custom
  • Run make build && make fmt

Validation

make golint-custom

All EqualFold findings should resolve.

Generated by 🧌 LintMonster · 177 AIC ·

  • expires on Jun 12, 2026, 3:50 AM UTC

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions