From cb4746503679827175b7f4a5b259948baa986524 Mon Sep 17 00:00:00 2001 From: Leo Balduf Date: Mon, 16 Sep 2024 17:25:38 +0200 Subject: [PATCH] *: make linter happy --- metricplugin/bitswap_discovery_probe.go | 4 ++-- metricplugin/metric_export.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/metricplugin/bitswap_discovery_probe.go b/metricplugin/bitswap_discovery_probe.go index 22f8e5e..14bd4f2 100644 --- a/metricplugin/bitswap_discovery_probe.go +++ b/metricplugin/bitswap_discovery_probe.go @@ -296,7 +296,7 @@ func (wt *BitswapDiscoveryProbe) broadcast(cids []cid.Cid, want bool, cancelAfte workChan := make(chan peer.ID) for i := 0; i < numGoroutines; i++ { wg.Add(1) - go func(i int) { + go func() { defer wg.Done() // We allocate and reuse one message to save strain on the GC. @@ -318,7 +318,7 @@ func (wt *BitswapDiscoveryProbe) broadcast(cids []cid.Cid, want bool, cancelAfte sendBroadcastSinglePeer(want, sender, cids, msg, logger, peerID, resultsChan, cancelAfterSeconds, cancelAfter, &wg) } - }(i) + }() } // Feed work into workers diff --git a/metricplugin/metric_export.go b/metricplugin/metric_export.go index 9ed5ab2..618fa82 100644 --- a/metricplugin/metric_export.go +++ b/metricplugin/metric_export.go @@ -269,7 +269,7 @@ func tracerSetup() interface{} { // Add lifecycle stuff to shut down cleanly. // TODO I don't think this works. lc.Append(fx.Hook{ - OnStop: func(ctx context.Context) error { + OnStop: func(_ context.Context) error { tracer.Shutdown() return nil },