Skip to content

Chore: remove loopclosure captures from tests. #15183

Open
@ajm188

Description

@ajm188

Feature Description

Go 1.22 has fixed the loop variable gotcha, which means we can remove any variable assignments that existed purely to mitigate. For example, a lot of our tests follow the pattern:

for _, tt := range tests {
    tt := tt
    t.Run(...) { ... }
}

we can now remove that superfluous assignment, which may also lead to confusion in the future as it's now purely a historical artifact.

Use Case(s)

tidy tests

Metadata

Metadata

Type

No type

Projects

Status

In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions