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:
parent
43a5402ce7
commit
6e8e738ad2
1 changed files with 2 additions and 2 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue