Skip to content

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

@callthingsoff

Description

@callthingsoff

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions