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

Remove deprecated linter, exportloopref, from golangci.yml and replace with copyloopvar #52

Open
jtieri opened this issue Oct 1, 2024 · 0 comments

Comments

@jtieri
Copy link
Member

jtieri commented Oct 1, 2024

As of Go 1.22 a fix for the for loop scoping issue has been introduced by making for loops use a per-iteration scope instead of per-loop scope. This means you no longer need to make a copy of loop variables, which makes the existing exportloopref linter unnecessary. golangci-lint has deprecated the linter in favor of a new linter named copyloopvar, which instead looks for unnecessary copy statements in loops.

- exportloopref

Now that Go 1.23 is released we should be using at least 1.22 in our repos.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant