Skip to content

Commit

Permalink
Merge pull request #30 from crobby/migrationreview31
Browse files Browse the repository at this point in the history
Outdent else blocks to make lint happy
  • Loading branch information
nflynt committed Aug 17, 2023
2 parents ea68517 + 99a1814 commit 552fb84
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions pkg/agent/clean/adunmigration/rtbs.go
Expand Up @@ -164,9 +164,8 @@ func updateCRTB(crtbInterface v3norman.ClusterRoleTemplateBindingInterface, oldC
if apierrors.IsInternalError(err) {
logrus.Errorf("[%v] internal error while creating crtb, will backoff and retry: %v", migrateCrtbsOperation, err)
return false, err
} else {
return true, fmt.Errorf("[%v] unable to create new CRTB: %w", migrateCrtbsOperation, err)
}
return true, fmt.Errorf("[%v] unable to create new CRTB: %w", migrateCrtbsOperation, err)
}
return true, nil
})
Expand All @@ -180,9 +179,8 @@ func updateCRTB(crtbInterface v3norman.ClusterRoleTemplateBindingInterface, oldC
if apierrors.IsInternalError(err) {
logrus.Errorf("[%v] internal error while deleting crtb, will backoff and retry: %v", migrateCrtbsOperation, err)
return false, err
} else {
return true, fmt.Errorf("[%v] unable to delete old CRTB: %w", migrateCrtbsOperation, err)
}
return true, fmt.Errorf("[%v] unable to delete old CRTB: %w", migrateCrtbsOperation, err)
}
return true, nil
})
Expand Down Expand Up @@ -270,9 +268,8 @@ func updatePRTB(prtbInterface v3norman.ProjectRoleTemplateBindingInterface, oldP
if apierrors.IsInternalError(err) {
logrus.Errorf("[%v] internal error while creating prtb, will backoff and retry: %v", migratePrtbsOperation, err)
return false, err
} else {
return true, fmt.Errorf("[%v] unable to create new PRTB: %w", migratePrtbsOperation, err)
}
return true, fmt.Errorf("[%v] unable to create new PRTB: %w", migratePrtbsOperation, err)
}
return true, nil
})
Expand All @@ -286,9 +283,8 @@ func updatePRTB(prtbInterface v3norman.ProjectRoleTemplateBindingInterface, oldP
if apierrors.IsInternalError(err) {
logrus.Errorf("[%v] internal error while deleting prtb, will backoff and retry: %v", migratePrtbsOperation, err)
return false, err
} else {
return true, fmt.Errorf("[%v] unable to delete old PRTB: %w", migratePrtbsOperation, err)
}
return true, fmt.Errorf("[%v] unable to delete old PRTB: %w", migratePrtbsOperation, err)
}
return true, nil
})
Expand Down

0 comments on commit 552fb84

Please sign in to comment.