From 3ab8559d1cc0fb6eabff5b5763c3366e891bffc3 Mon Sep 17 00:00:00 2001 From: Takashi Kusumi Date: Tue, 24 Aug 2021 17:30:19 +0900 Subject: [PATCH] Kubernetes SD: Fix golint issue Signed-off-by: Takashi Kusumi --- discovery/kubernetes/ingress_adaptor.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/discovery/kubernetes/ingress_adaptor.go b/discovery/kubernetes/ingress_adaptor.go index c6c45cd2c6..113a067ca0 100644 --- a/discovery/kubernetes/ingress_adaptor.go +++ b/discovery/kubernetes/ingress_adaptor.go @@ -52,9 +52,7 @@ func (i *ingressAdaptorV1) ingressClassName() *string { return i.ingress.Sp func (i *ingressAdaptorV1) tlsHosts() []string { var hosts []string for _, tls := range i.ingress.Spec.TLS { - for _, host := range tls.Hosts { - hosts = append(hosts, host) - } + hosts = append(hosts, tls.Hosts...) } return hosts } @@ -107,9 +105,7 @@ func (i *ingressAdaptorV1Beta1) ingressClassName() *string { return i.ingre func (i *ingressAdaptorV1Beta1) tlsHosts() []string { var hosts []string for _, tls := range i.ingress.Spec.TLS { - for _, host := range tls.Hosts { - hosts = append(hosts, host) - } + hosts = append(hosts, tls.Hosts...) } return hosts }