change struct methods receiver to pointer

This commit is contained in:
lhaha 2023-08-12 10:21:14 +08:00
parent 6e0cb243d5
commit 947c9376f6

View File

@ -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() key, quit := jm.orphanQueue.Get()
if quit { if quit {
return false 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. // 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() startTime := jm.clock.Now()
logger := klog.FromContext(ctx) logger := klog.FromContext(ctx)
defer func() { defer func() {