errgroup: fix go vet "copy lock value" warning

Change-Id: I55256db02fe52ced96fe394574b81ced090999fe
Reviewed-on: https://go-review.googlesource.com/c/sync/+/236477
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
This commit is contained in:
Cholerae Hu 2020-06-04 15:59:01 +08:00 committed by Bryan C. Mills
commit 6e8e738ad2

View file

@ -34,7 +34,7 @@ func fakeSearch(kind string) Search {
// simplify goroutine counting and error handling. This example is derived from
// the sync.WaitGroup example at https://golang.org/pkg/sync/#example_WaitGroup.
func ExampleGroup_justErrors() {
var g errgroup.Group
g := new(errgroup.Group)
var urls = []string{
"http://www.golang.org/",
"http://www.google.com/",
@ -114,7 +114,7 @@ func TestZeroGroup(t *testing.T) {
}
for _, tc := range cases {
var g errgroup.Group
g := new(errgroup.Group)
var firstErr error
for i, err := range tc.errs {