Skip to content

Commit

Permalink
Fix golangci-lint code issue
Browse files Browse the repository at this point in the history
  • Loading branch information
zhengtianbao committed Jul 12, 2022
1 parent f38c61d commit 56833d8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion internal/metrics/metric.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,6 @@ func (m *Metric) RemoveDatum(labelvalues ...string) error {
if lv == olv {
// remove from the slice
m.LabelValues = append(m.LabelValues[:i], m.LabelValues[i+1:]...)
i--
delete(m.labelValuesMap, k)
break
}
Expand Down
2 changes: 1 addition & 1 deletion internal/metrics/store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ func TestExpireManyMetrics(t *testing.T) {
t.Error(err)
}
datum.SetInt(d, 1, time.Now().Add(-time.Hour))
lv := m.FindLabelValueOrNil([]string{strconv.Itoa(i)})
lv = m.FindLabelValueOrNil([]string{strconv.Itoa(i)})
if lv == nil {
t.Fatal("couldn't find lv")
}
Expand Down

0 comments on commit 56833d8

Please sign in to comment.