From 947c9376f6a55bb6755c438b9ef431eefe24eeb4 Mon Sep 17 00:00:00 2001 From: lhaha <70438293+luohaha3123@users.noreply.github.com> Date: Sat, 12 Aug 2023 10:21:14 +0800 Subject: [PATCH] change struct methods receiver to pointer --- pkg/controller/job/job_controller.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/controller/job/job_controller.go b/pkg/controller/job/job_controller.go index 8f46c84562d..bef15a4d94e 100644 --- a/pkg/controller/job/job_controller.go +++ b/pkg/controller/job/job_controller.go @@ -603,7 +603,7 @@ func (jm *Controller) orphanWorker(ctx context.Context) { } } -func (jm Controller) processNextOrphanPod(ctx context.Context) bool { +func (jm *Controller) processNextOrphanPod(ctx context.Context) bool { key, quit := jm.orphanQueue.Get() if quit { return false @@ -621,7 +621,7 @@ func (jm Controller) processNextOrphanPod(ctx context.Context) bool { } // syncOrphanPod removes the tracking finalizer from an orphan pod if found. -func (jm Controller) syncOrphanPod(ctx context.Context, key string) error { +func (jm *Controller) syncOrphanPod(ctx context.Context, key string) error { startTime := jm.clock.Now() logger := klog.FromContext(ctx) defer func() {