Skip to content

Commit

Permalink
indent-error-flow: if block ends with a return statement, so drop thi…
Browse files Browse the repository at this point in the history
…s else and outdent its block (revive)
  • Loading branch information
Gong Yongjie committed Apr 8, 2024
1 parent a436a32 commit dadd1c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/ingress/controller/store/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -1053,9 +1053,9 @@ func (s *k8sStore) GetIngressClass(ing *networkingv1.Ingress, icConfig *ingressc
if icConfig.IgnoreIngressClass {
if icConfig.AnnotationValue == *ing.Spec.IngressClassName {
return *ing.Spec.IngressClassName, nil
} else {
return "", errors.Errorf("lack of permission on cluter resource IngressClass: %s", *ing.Spec.IngressClassName)
}

return "", errors.Errorf("lack of permission on cluter resource IngressClass: %s", *ing.Spec.IngressClassName)
}
iclass, err := s.listers.IngressClass.ByKey(*ing.Spec.IngressClassName)
if err != nil {
Expand Down

0 comments on commit dadd1c0

Please sign in to comment.