Skip to content

x/website: wiki CommonMistakes should mention Go 1.22 about loop variables #68309

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

Closed
callthingsoff opened this issue Jul 4, 2024 · 2 comments
Labels
Milestone

Comments

@callthingsoff
Copy link
Contributor

https://go.dev/wiki/CommonMistakes is not updated after Go 1.22 release.

I see faq is saying:

This behavior of the language, not defining a new variable for each iteration, was considered a mistake in retrospect, and has been addressed in Go 1.22, which does indeed create a new variable for each iteration, eliminating this issue.

@gopherbot gopherbot added this to the Unreleased milestone Jul 4, 2024
@gabyhelp
Copy link

gabyhelp commented Jul 4, 2024

Related Issues

(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)

@callthingsoff
Copy link
Contributor Author

Dup of #65659

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

No branches or pull requests

3 participants