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.
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.