Skip to content

Commit c9b99eb

Browse files
committed
fmt
1 parent be1b1c2 commit c9b99eb

File tree

3 files changed

+21
-21
lines changed

3 files changed

+21
-21
lines changed

pkg/controller/controller.go

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,9 @@ func (options *TypedOptions[request]) DefaultFromConfig(config config.Controller
131131
options.NeedLeaderElection = config.NeedLeaderElection
132132
}
133133

134-
if options.NeedWarmup == nil {
135-
options.NeedWarmup = config.NeedWarmup
136-
}
134+
if options.NeedWarmup == nil {
135+
options.NeedWarmup = config.NeedWarmup
136+
}
137137
}
138138

139139
// Controller implements an API. A Controller manages a work queue fed reconcile.Requests
@@ -254,16 +254,16 @@ func NewTypedUnmanaged[request comparable](name string, options TypedOptions[req
254254

255255
// Create controller with dependencies set
256256
return &controller.Controller[request]{
257-
Do: options.Reconciler,
258-
RateLimiter: options.RateLimiter,
259-
NewQueue: options.NewQueue,
260-
MaxConcurrentReconciles: options.MaxConcurrentReconciles,
261-
CacheSyncTimeout: options.CacheSyncTimeout,
262-
Name: name,
263-
LogConstructor: options.LogConstructor,
264-
RecoverPanic: options.RecoverPanic,
265-
LeaderElected: options.NeedLeaderElection,
266-
NeedWarmup: options.NeedWarmup,
257+
Do: options.Reconciler,
258+
RateLimiter: options.RateLimiter,
259+
NewQueue: options.NewQueue,
260+
MaxConcurrentReconciles: options.MaxConcurrentReconciles,
261+
CacheSyncTimeout: options.CacheSyncTimeout,
262+
Name: name,
263+
LogConstructor: options.LogConstructor,
264+
RecoverPanic: options.RecoverPanic,
265+
LeaderElected: options.NeedLeaderElection,
266+
NeedWarmup: options.NeedWarmup,
267267
}, nil
268268
}
269269

pkg/controller/controller_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ var _ = Describe("controller.Controller", func() {
481481

482482
// Test with ShouldWarmupWithoutLeadership set to true
483483
ctrlWithWarmup, err := controller.New("warmup-enabled-ctrl", m, controller.Options{
484-
Reconciler: reconcile.Func(nil),
484+
Reconciler: reconcile.Func(nil),
485485
NeedWarmup: ptr.To(true),
486486
})
487487
Expect(err).NotTo(HaveOccurred())
@@ -493,7 +493,7 @@ var _ = Describe("controller.Controller", func() {
493493

494494
// Test with ShouldWarmupWithoutLeadership set to false
495495
ctrlWithoutWarmup, err := controller.New("warmup-disabled-ctrl", m, controller.Options{
496-
Reconciler: reconcile.Func(nil),
496+
Reconciler: reconcile.Func(nil),
497497
NeedWarmup: ptr.To(false),
498498
})
499499
Expect(err).NotTo(HaveOccurred())
@@ -534,7 +534,7 @@ var _ = Describe("controller.Controller", func() {
534534

535535
// Test that explicit controller setting overrides manager setting
536536
ctrlOverridingWarmup, err := controller.New("override-warmup-disabled", managerWithWarmup, controller.Options{
537-
Reconciler: reconcile.Func(nil),
537+
Reconciler: reconcile.Func(nil),
538538
NeedWarmup: ptr.To(false),
539539
})
540540
Expect(err).NotTo(HaveOccurred())

pkg/manager/runnable_group.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -230,16 +230,16 @@ func (r *runnableGroup) reconcile() {
230230
}
231231
}()
232232

233-
// If we return, the runnable ended cleanly
233+
// If we return, the runnable ended cleanly
234234
// or returned an error to the channel.
235235
//
236236
// We should always decrement the WaitGroup here.
237237
defer r.wg.Done()
238238

239239
// Start the runnable.
240-
if err := rn.Start(r.ctx); err != nil {
241-
r.errChan <- err
242-
}
240+
if err := rn.Start(r.ctx); err != nil {
241+
r.errChan <- err
242+
}
243243
}(runnable)
244244
}
245245
}
@@ -297,7 +297,7 @@ func (r *runnableGroup) Add(rn Runnable, ready runnableCheck) error {
297297
// StopAndWait waits for all the runnables to finish before returning.
298298
func (r *runnableGroup) StopAndWait(ctx context.Context) {
299299
r.stopOnce.Do(func() {
300-
// Close the reconciler channel once we're done.
300+
// Close the reconciler channel once we're done.
301301
defer func() {
302302
r.stop.Lock()
303303
close(r.ch)

0 commit comments

Comments
 (0)