Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update waitgroups example to use go 1.22 #508

Merged
merged 1 commit into from
Feb 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions examples/waitgroups/waitgroups.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ func main() {
// counter for each.
for i := 1; i <= 5; i++ {
wg.Add(1)
// Avoid re-use of the same `i` value in each goroutine closure.
// See [the FAQ](https://golang.org/doc/faq#closures_and_goroutines)
// for more details.
i := i

// Wrap the worker call in a closure that makes sure to tell
// the WaitGroup that this worker is done. This way the worker
Expand Down
4 changes: 2 additions & 2 deletions examples/waitgroups/waitgroups.hash
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
66d1c1cdb7e60f63b9b30938aa9c63b2262463ac
S98GjeaGBX0
c81a54fed0cd96464456e05b46163329eb7c958b
fC_Chrkb5uA
17 changes: 2 additions & 15 deletions public/waitgroups

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading