From 0447e1f9ced537b458b1c28df915bbd1aa6f564b Mon Sep 17 00:00:00 2001 From: "tao.yang" Date: Mon, 4 Sep 2023 16:59:23 +0800 Subject: [PATCH] cleanup: omit comparison with bool constants Signed-off-by: tao.yang Kubernetes-commit: b35357b6c08f21ba0fd312536051394c2567ec79 --- tools/cache/heap_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/cache/heap_test.go b/tools/cache/heap_test.go index c2e47698..ed50ee01 100644 --- a/tools/cache/heap_test.go +++ b/tools/cache/heap_test.go @@ -264,7 +264,7 @@ func TestHeap_Get(t *testing.T) { } // Get non-existing object. _, exists, err = h.Get(mkHeapObj("non-existing", 0)) - if err != nil || exists == true { + if err != nil || exists { t.Fatalf("didn't expect to get any object") } } @@ -283,7 +283,7 @@ func TestHeap_GetByKey(t *testing.T) { } // Get non-existing object. _, exists, err = h.GetByKey("non-existing") - if err != nil || exists == true { + if err != nil || exists { t.Fatalf("didn't expect to get any object") } }