From 60f8c025df609e68f1bc1df504729a511e97b359 Mon Sep 17 00:00:00 2001 From: drivebyer Date: Fri, 15 Nov 2024 16:36:04 +0800 Subject: [PATCH] lint Signed-off-by: drivebyer --- pkg/controllers/rediscluster/rediscluster_controller.go | 2 +- pkg/controllerutil/controller_common.go | 2 +- pkg/k8sutils/finalizer_test.go | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/pkg/controllers/rediscluster/rediscluster_controller.go b/pkg/controllers/rediscluster/rediscluster_controller.go index d1d53d936..0c79a2a56 100644 --- a/pkg/controllers/rediscluster/rediscluster_controller.go +++ b/pkg/controllers/rediscluster/rediscluster_controller.go @@ -19,7 +19,6 @@ package rediscluster import ( "context" "fmt" - "sigs.k8s.io/controller-runtime/pkg/log" "time" "github.com/OT-CONTAINER-KIT/redis-operator/api/status" @@ -33,6 +32,7 @@ import ( "k8s.io/client-go/kubernetes" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/log" ) // Reconciler reconciles a RedisCluster object diff --git a/pkg/controllerutil/controller_common.go b/pkg/controllerutil/controller_common.go index f153dea92..2163b0291 100644 --- a/pkg/controllerutil/controller_common.go +++ b/pkg/controllerutil/controller_common.go @@ -2,10 +2,10 @@ package controllerutil import ( "context" - "sigs.k8s.io/controller-runtime/pkg/log" "time" apierrors "k8s.io/apimachinery/pkg/api/errors" + "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/reconcile" ) diff --git a/pkg/k8sutils/finalizer_test.go b/pkg/k8sutils/finalizer_test.go index 3f6e7cfb2..1267b79e8 100644 --- a/pkg/k8sutils/finalizer_test.go +++ b/pkg/k8sutils/finalizer_test.go @@ -261,7 +261,6 @@ func TestHandleRedisClusterFinalizer(t *testing.T) { for _, tc := range tests { t.Run(tc.name, func(t *testing.T) { - var k8sClient *k8sClientFake.Clientset if tc.existingPVC != nil { k8sClient = k8sClientFake.NewSimpleClientset(helperToRuntimeObjects(tc.existingPVC)...) @@ -460,7 +459,6 @@ func TestHandleRedisReplicationFinalizer(t *testing.T) { for _, tc := range tests { t.Run(tc.name, func(t *testing.T) { - var k8sClient *k8sClientFake.Clientset if tc.existingPVC != nil { k8sClient = k8sClientFake.NewSimpleClientset(helperToRuntimeObjects(tc.existingPVC)...)