mirror of https://github.com/k3s-io/k3s
Fix golint failures on cmd/apis/extensions/...
parent
508a4f7544
commit
a89ee493dd
|
@ -53,7 +53,6 @@ pkg/apis/events
|
|||
pkg/apis/events/v1beta1
|
||||
pkg/apis/extensions
|
||||
pkg/apis/extensions/v1beta1
|
||||
pkg/apis/extensions/validation
|
||||
pkg/apis/imagepolicy
|
||||
pkg/apis/imagepolicy/v1alpha1
|
||||
pkg/apis/networking
|
||||
|
|
|
@ -162,10 +162,9 @@ func validateIngressBackend(backend *extensions.IngressBackend, fldPath *field.P
|
|||
// All backends must reference a single local service by name, and a single service port by name or number.
|
||||
if len(backend.ServiceName) == 0 {
|
||||
return append(allErrs, field.Required(fldPath.Child("serviceName"), ""))
|
||||
} else {
|
||||
for _, msg := range apivalidation.ValidateServiceName(backend.ServiceName, false) {
|
||||
allErrs = append(allErrs, field.Invalid(fldPath.Child("serviceName"), backend.ServiceName, msg))
|
||||
}
|
||||
}
|
||||
for _, msg := range apivalidation.ValidateServiceName(backend.ServiceName, false) {
|
||||
allErrs = append(allErrs, field.Invalid(fldPath.Child("serviceName"), backend.ServiceName, msg))
|
||||
}
|
||||
allErrs = append(allErrs, apivalidation.ValidatePortNumOrName(backend.ServicePort, fldPath.Child("servicePort"))...)
|
||||
return allErrs
|
||||
|
|
Loading…
Reference in New Issue