Skip to content
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

Chore: use new range for loops #15193

Open
ajm188 opened this issue Feb 9, 2024 · 2 comments
Open

Chore: use new range for loops #15193

ajm188 opened this issue Feb 9, 2024 · 2 comments
Labels
Component: General Changes throughout the code base good first issue Good issue for new contributors Type: Internal Cleanup

Comments

@ajm188
Copy link
Contributor

ajm188 commented Feb 9, 2024

Feature Description

Go 1.22 introduced the ability to range over integers in a more concise manner, e.g.

for i := 0; i < n; i++

becomes

for i := range n

Use Case(s)

Modernize the codebase

@ajm188 ajm188 added Type: Internal Cleanup good first issue Good issue for new contributors Component: General Changes throughout the code base labels Feb 9, 2024
@Zen-cronic
Copy link

hey, i was looking into this and found that as of the merged PR #16371, there're 815 occurrences across 350 files in this repo.

Script: rg -n --pcre2 'for i :=(?!.*range)'. Explained here.

So I believe this is gonna be a pretty tedious task, and that it should be shared among more than 1 contributors!

@akagami-harsh
Copy link

akagami-harsh commented Feb 7, 2025

i would like to work on this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: General Changes throughout the code base good first issue Good issue for new contributors Type: Internal Cleanup
Projects
Development

No branches or pull requests

3 participants