Fix linter issues for golangci-lint 1.54.2

Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
This commit is contained in:
Kohei Tokunaga
2023-10-03 21:56:47 +09:00
parent 28fa2751f2
commit 6169433b6b
11 changed files with 11 additions and 6 deletions

View File

@@ -98,6 +98,7 @@ func (o *oomCollector) Collect(ch chan<- prometheus.Metric) {
o.mu.Lock()
defer o.mu.Unlock()
for _, t := range o.set {
t := t
c := atomic.LoadInt64(&t.count)
ch <- prometheus.MustNewConstMetric(o.desc, prometheus.CounterValue, float64(c), t.id, t.namespace)
}