From eac677615948ee32eb70388820993137af1edba9 Mon Sep 17 00:00:00 2001
From: Eli Bendersky
Date: Fri, 10 Sep 2021 07:19:33 -0700
Subject: [PATCH] Clarify comment
Remove an ambiguous part of the comment that can cause confusion -
passing a WaitGroup by pointer is always mandatory.
---
examples/waitgroups/waitgroups.go | 2 --
examples/waitgroups/waitgroups.hash | 4 ++--
public/waitgroups | 6 ++----
3 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/examples/waitgroups/waitgroups.go b/examples/waitgroups/waitgroups.go
index c32cd24..5ac70b5 100644
--- a/examples/waitgroups/waitgroups.go
+++ b/examples/waitgroups/waitgroups.go
@@ -23,8 +23,6 @@ func main() {
// This WaitGroup is used to wait for all the
// goroutines launched here to finish. Note: if a WaitGroup is
// explicitly passed into functions, it should be done *by pointer*.
- // This would be important if, for example, our worker had to launch
- // additional goroutines.
var wg sync.WaitGroup
// Launch several goroutines and increment the WaitGroup
diff --git a/examples/waitgroups/waitgroups.hash b/examples/waitgroups/waitgroups.hash
index 9dea057..5fdeaf5 100644
--- a/examples/waitgroups/waitgroups.hash
+++ b/examples/waitgroups/waitgroups.hash
@@ -1,2 +1,2 @@
-58031ceb701a1cab27498efd89adadbf1ea6b3e6
-vmjCBfN6MJE
+66d1c1cdb7e60f63b9b30938aa9c63b2262463ac
+S98GjeaGBX0
diff --git a/public/waitgroups b/public/waitgroups
index d1b609a..6b0da36 100644
--- a/public/waitgroups
+++ b/public/waitgroups
@@ -42,7 +42,7 @@ use a wait group.
- 
+ 
package main
|
@@ -107,9 +107,7 @@ use a wait group.
This WaitGroup is used to wait for all the
goroutines launched here to finish. Note: if a WaitGroup is
-explicitly passed into functions, it should be done by pointer.
-This would be important if, for example, our worker had to launch
-additional goroutines.
+explicitly passed into functions, it should be done by pointer.
|
|