Skip to content

Commit ca470ca

Browse files
committed
fix golangci lint
Signed-off-by: dongjiang <[email protected]>
1 parent 3ac1786 commit ca470ca

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pkg/controller/priorityqueue/priorityqueue.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ func (w *priorityqueue[T]) GetWithPriority() (_ T, priority int, shutdown bool)
279279
w.notifyItemOrWaiterAdded()
280280

281281
// ref: https://github.com/kubernetes-sigs/controller-runtime/issues/3239
282-
if w.shutdown.Load() == true {
282+
if w.shutdown.Load() {
283283
var zero T
284284
return zero, 0, true
285285
}

pkg/controller/priorityqueue/priorityqueue_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,12 +312,12 @@ var _ = Describe("Controllerworkqueue", func() {
312312
item, priority, isShutDown := q.GetWithPriority()
313313
Expect(item).To(Equal(""))
314314
Expect(priority).To(Equal(0))
315-
Expect(isShutDown).To(Equal(true))
315+
Expect(isShutDown).To(BeTrue())
316316

317317
item1, priority1, isShutDown := q.GetWithPriority()
318318
Expect(item1).To(Equal(""))
319319
Expect(priority1).To(Equal(0))
320-
Expect(isShutDown).To(Equal(true))
320+
Expect(isShutDown).To(BeTrue())
321321
})
322322

323323
It("items are included in Len() and the queueDepth metric once they are ready", func() {

0 commit comments

Comments
 (0)