Skip to content

Commit

Permalink
Merge pull request #3 from karamaru-alpha/update/readme
Browse files Browse the repository at this point in the history
update: README.md
  • Loading branch information
karamaru-alpha committed Feb 15, 2024
2 parents a45fda3 + 9d2db00 commit d7c2d6e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -8,13 +8,13 @@ cf. [Fixing For Loops in Go 1.22](https://go.dev/blog/loopvar-preview)

```go
for i, v := range []int{1, 2, 3} {
i := i // It's unnecessary to copy the loop variable "i"
v := v // It's unnecessary to copy the loop variable "v"
i := i // The copy of the 'for' variable "i" can be deleted \(Go 1\.22\+\)
v := v // The copy of the 'for' variable "v" can be deleted \(Go 1\.22\+\)
_, _ = i, v
}

for i := 1; i <= 3; i++ {
i := i // It's unnecessary to copy the loop variable "i"
i := i // The copy of the 'for' variable "i" can be deleted \(Go 1\.22\+\)
_ = i
}
```
Expand Down

0 comments on commit d7c2d6e

Please sign in to comment.