// patchRecoverableCondition updates the recoverable condition status of the
// field export CR. The resource passed in the parameter gets updated with the
// conditions
patchRecoverableCondition updates the recoverable condition status of the
field export CR. The resource passed in the parameter gets updated with the
conditions
// patchRecoverableCondition updates the recoverable condition status of the // field export CR . The resource passed in the parameter gets updated with the // conditions
func (r *fieldExportReconciler) patchRecoverableCondition(
	ctx context.Context,
	res *ackv1alpha1.FieldExport,
	err error,
) error {
	var recoverableCondition *ackv1alpha1.Condition = nil
	for _, condition := range res.Status.Conditions {
		if condition.Type == ackv1alpha1.ConditionTypeRecoverable {
			recoverableCondition = condition
			break
		}
	}
	if recoverableCondition == nil {
		recoverableCondition = &ackv1alpha1.Condition{
			Type: ackv1alpha1.ConditionTypeRecoverable,
		}
		res.Status.Conditions = append(res.Status.Conditions, recoverableCondition)
	}
	var errMessage string
	if err != nil {
		errMessage = err.Error()
		recoverableCondition.Status = corev1.ConditionTrue
		recoverableCondition.Message = &errMessage
	}
	return nil
}
func ( r * fieldExportReconciler ) patchRecoverableCondition ( ctx context . Context , res * ackv1alpha1 . FieldExport , err error , ) error { var recoverableCondition * ackv1alpha1 . Condition = nil for _ , condition := range res . Status . Conditions { if condition . Type == ackv1alpha1 . ConditionTypeRecoverable { recoverableCondition = condition break } } if recoverableCondition == nil { recoverableCondition = & ackv1alpha1 . Condition { Type : ackv1alpha1 . ConditionTypeRecoverable , } res . Status . Conditions = append ( res . Status . Conditions , recoverableCondition ) } var errMessage string if err != nil { errMessage = err . Error ( ) recoverableCondition . Status = corev1 . ConditionTrue recoverableCondition . Message = & errMessage } return nil }
patchRecoverableCondition updates the recoverable condition status of the
field export CR.
patchRecoverableCondition updates the recoverable condition status of the field export CR .
// Recoverable condition