Skip to content

Commit 27d6364

Browse files
committed
Avoid unnecessary else when returning
1 parent 5905190 commit 27d6364

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

pkg/controller/controller.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -203,11 +203,10 @@ func NewTypedUnmanaged[request comparable](name string, mgr manager.Manager, opt
203203
return priorityqueue.New(controllerName, func(o *priorityqueue.Opts[request]) {
204204
o.RateLimiter = rateLimiter
205205
})
206-
} else {
207-
return workqueue.NewTypedRateLimitingQueueWithConfig(rateLimiter, workqueue.TypedRateLimitingQueueConfig[request]{
208-
Name: controllerName,
209-
})
210206
}
207+
return workqueue.NewTypedRateLimitingQueueWithConfig(rateLimiter, workqueue.TypedRateLimitingQueueConfig[request]{
208+
Name: controllerName,
209+
})
211210
}
212211
}
213212

0 commit comments

Comments
 (0)