From 28d72153a1fd25cbf45bb9422b1936771eef7100 Mon Sep 17 00:00:00 2001 From: yangw Date: Sat, 21 Dec 2024 23:30:02 +0800 Subject: [PATCH] fix lint Signed-off-by: yangw --- pkg/controllers/redis/redis_controller_test.go | 2 +- pkg/controllers/rediscluster/rediscluster_controller_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/controllers/redis/redis_controller_test.go b/pkg/controllers/redis/redis_controller_test.go index bf3fdabfb..d9e07da08 100644 --- a/pkg/controllers/redis/redis_controller_test.go +++ b/pkg/controllers/redis/redis_controller_test.go @@ -88,7 +88,7 @@ var _ = Describe("Redis Controller", func() { var exporterContainer *corev1.Container for _, container := range sts.Spec.Template.Spec.Containers { if container.Name == "redis-exporter" { - exporterContainer = &container + exporterContainer = &container //nolint:exportloopref break } } diff --git a/pkg/controllers/rediscluster/rediscluster_controller_test.go b/pkg/controllers/rediscluster/rediscluster_controller_test.go index 663291d54..ee683a32d 100644 --- a/pkg/controllers/rediscluster/rediscluster_controller_test.go +++ b/pkg/controllers/rediscluster/rediscluster_controller_test.go @@ -113,7 +113,7 @@ var _ = Describe("Redis Cluster Controller", func() { var exporterContainer *corev1.Container for _, c := range leaderSts.Spec.Template.Spec.Containers { if c.Name == "redis-exporter" { - exporterContainer = &c + exporterContainer = &c //nolint:exportloopref break } }