Skip to content

Update toolchain and code to Go 1.22 #18

@rg0now

Description

@rg0now

The default behavior of for variables has changed in Go 1.22. This issue should track the progress in updating everything (see below) to Go 1.22.

Previously, the variables declared by a "for" loop were created once and updated by each iteration. In Go 1.22, each iteration of the loop creates new variables, to avoid accidental sharing bugs. This removes a number of stupid GOTCHAs.

Proposed changes:
☐ update the Go toolchain in the install scripts and the VM
☐ update slides: remove all occurrences of protecting against the "sharing" GOTCHA, including potentially the cases when we create new goroutines in the for loop (check this)
☐ update sample code that comes with the slide-deck
☐ update labs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions