Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Modernize for loop using range over int in SetParamValues #2823

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
vishr wants to merge 1 commit into master
base: master
Choose a base branch
Loading
from modernize-for-loop-range-over-int

Conversation

@vishr
Copy link
Member

@vishr vishr commented Sep 16, 2025

Summary

Modernizes a for loop in context.go to use Go 1.22's new range over int syntax for cleaner iteration.

Changes:

  • Replace for i := 0; i < limit; i++ with for i := range limit in SetParamValues method

Benefits:

  • Cleaner, more idiomatic Go 1.22+ code
  • Slight performance improvement
  • Reduced cognitive load

Test plan

  • All existing tests pass
  • Linting passes
  • No behavioral changes

🤖 Generated with Claude Code

Uses Go 1.22+ range over int syntax for cleaner iteration.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

AltStyle によって変換されたページ (->オリジナル) /