File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -445,7 +445,7 @@ func WithUninstallAnnotations(as ...annotation.Uninstall) Option {
445445type PauseReconcileHandlerFunc func (ctx context.Context , obj * unstructured.Unstructured ) (bool , error )
446446
447447// WithPauseReconcileHandler is an Option that sets a PauseReconcile handler, which is a function that
448- // that determines whether reconciliation should be paused for the custom resource watched by this reconciler.
448+ // determines whether reconciliation should be paused for the custom resource watched by this reconciler.
449449//
450450// Example usage: WithPauseReconcileHandler(PauseReconcileIfAnnotationTrue("my.domain/pause-reconcile"))
451451func WithPauseReconcileHandler (handler PauseReconcileHandlerFunc ) Option {
@@ -459,10 +459,8 @@ func WithPauseReconcileHandler(handler PauseReconcileHandlerFunc) Option {
459459// annotation is present and set to "true"
460460func PauseReconcileIfAnnotationTrue (annotationName string ) PauseReconcileHandlerFunc {
461461 return func (ctx context.Context , obj * unstructured.Unstructured ) (bool , error ) {
462- if v , ok := obj .GetAnnotations ()[annotationName ]; ok {
463- if v == "true" {
464- return true , nil
465- }
462+ if v , ok := obj .GetAnnotations ()[annotationName ]; ok && v == "true" {
463+ return true , nil
466464 }
467465
468466 return false , nil
You can’t perform that action at this time.
0 commit comments