Fix govet warning in Dag
This commit was moved from ipfs/go-ipfs-http-client@62552b33959401c7a9d9463dffba433e522b2f15
Łukasz Magiera committed
Feb 12, 2019 at 12:29 UTC
0813d808b54341414441a56e5cd3a7722a516a14
1 file changed
+2
-2
client/httpapi/dag.go
+2
-2
@@ -44,7 +44,7 @@ func (api *HttpDagServ) GetMany(ctx context.Context, cids []cid.Cid) <-chan *for
44
45
for _, c := range cids {
46
// TODO: Consider limiting concurrency of this somehow
47
- go func() {
47
+ go func(c cid.Cid) {
48
defer wg.Done()
49
n, err := api.Get(ctx, c)
50
@@ -52,7 +52,7 @@ func (api *HttpDagServ) GetMany(ctx context.Context, cids []cid.Cid) <-chan *for
52
case out <- &format.NodeOption{Node: n, Err: err}:
53
case <-ctx.Done():
54
}
55
- }()
55
+ }(c)
56
}
57
return out
58
}