golang-samples
golang-samples copied to clipboard
Prepare for Loopvar scope change
go 1.21 includes an experiment to evaluate a proposed change in variable scoping of for loops: https://github.com/golang/go/wiki/LoopvarExperiment
before 1.22 is released, we should run all tests in this repo with this experiment enabled, to get a sense for whether it will work, and what side effects it may have.
Followup bugs can be filed for any issues identified.
Listing as p1 for now until we can determine if this blocks adoption of 1.22. if we're ok to move forward, we can downgrade to p2.
this looks to be a noop for our current tests, as determined by testing in #3756