indent-error-flow: if block ends with a return statement, so drop this else and outdent its block (revive)

This commit is contained in:
Gong Yongjie 2024-04-08 00:51:50 -04:00
parent a436a323a9
commit dadd1c09e0

View file

@ -1053,9 +1053,9 @@ func (s *k8sStore) GetIngressClass(ing *networkingv1.Ingress, icConfig *ingressc
if icConfig.IgnoreIngressClass { if icConfig.IgnoreIngressClass {
if icConfig.AnnotationValue == *ing.Spec.IngressClassName { if icConfig.AnnotationValue == *ing.Spec.IngressClassName {
return *ing.Spec.IngressClassName, nil 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) iclass, err := s.listers.IngressClass.ByKey(*ing.Spec.IngressClassName)
if err != nil { if err != nil {