Skip to content

Commit

Permalink
chores: golang linter fixes
Browse files Browse the repository at this point in the history
pkg/metrics/metricwithpod.go:21:22  staticcheck  SA1019: workqueue.DelayingInterface is deprecated: use TypedDelayingInterface instead.
pkg/metrics/metricwithpod.go:61:20  staticcheck  SA1019: workqueue.DelayingInterface is deprecated: use TypedDelayingInterface instead.
pkg/metrics/metricwithpod.go:63:14  staticcheck  SA1019: workqueue.NewDelayingQueue is deprecated: use TypedNewDelayingQueue instead.

Signed-off-by: Mahe Tardy <mahe.tardy@gmail.com>
  • Loading branch information
mtardy committed Aug 27, 2024
1 parent 2e26371 commit 483aef9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/metrics/metricwithpod.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
var (
metricsWithPod []*prometheus.MetricVec
metricsWithPodMutex sync.RWMutex
podQueue workqueue.DelayingInterface
podQueue workqueue.TypedDelayingInterface[any]
podQueueOnce sync.Once
deleteDelay = 1 * time.Minute
)
Expand Down Expand Up @@ -58,9 +58,9 @@ func RegisterPodDeleteHandler() {
})
}

func GetPodQueue() workqueue.DelayingInterface {
func GetPodQueue() workqueue.TypedDelayingInterface[any] {
podQueueOnce.Do(func() {
podQueue = workqueue.NewDelayingQueue()
podQueue = workqueue.TypedNewDelayingQueue[any]()
})
return podQueue
}
Expand Down

0 comments on commit 483aef9

Please sign in to comment.