Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
hzxuzhonghu committed Oct 29, 2019
1 parent 44cccd4 commit 5580a17
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/admission/admission_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ func validatePolicies(policies []v1alpha1.LifecyclePolicy, fldPath *field.Path)

if len(policy.Event) != 0 || len(policy.Events) != 0 {
bFlag := false
policyEventsList := getEventlist(policy)
policyEventsList := getEventList(policy)
for _, event := range policyEventsList {
if allow, ok := policyEventMap[event]; !ok || !allow {
err = multierror.Append(err, field.Invalid(fldPath, event, fmt.Sprintf("invalid policy event")))
Expand Down Expand Up @@ -188,7 +188,7 @@ func validatePolicies(policies []v1alpha1.LifecyclePolicy, fldPath *field.Path)
return err
}

func getEventlist(policy v1alpha1.LifecyclePolicy) []v1alpha1.Event {
func getEventList(policy v1alpha1.LifecyclePolicy) []v1alpha1.Event {
policyEventsList := policy.Events
if len(policy.Event) > 0 {
policyEventsList = append(policyEventsList, policy.Event)
Expand Down

0 comments on commit 5580a17

Please sign in to comment.