Skip to content

Commit eae7dc5

Browse files
committed
Simplify validation code
1 parent e75ac75 commit eae7dc5

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

pkg/admission/validator/shoot_validator.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,8 @@ func verifyCustomRules(customRules []service.CustomRule, shoot *core.Shoot) erro
218218
for _, rule := range customRules {
219219
if rule.ResourceName != "" && rule.ShootConfigMap != "" {
220220
return fmt.Errorf("found custom rule with both resource name and shoot config map defined")
221-
} else if rule.ResourceName == "" && rule.ShootConfigMap == "" {
221+
}
222+
if rule.ResourceName == "" && rule.ShootConfigMap == "" {
222223
return fmt.Errorf("found custom rule with neither resource name nor shoot config map defined")
223224
}
224225
if rule.ResourceName != "" {

0 commit comments

Comments
 (0)