mirror of
https://github.com/coredns/coredns.git
synced 2025-10-29 09:14:17 -04:00
K8s remove string ops (#2119)
* plugin/kubernetes: remove bunch a string ops This removes a bunch of appends to where not needed, makes dnsutil.Join take variadic args which removes the need to wrap in a new string slice. Signed-off-by: Miek Gieben <miek@miek.nl> * Fix calls to dnsutil.Join Signed-off-by: Miek Gieben <miek@miek.nl> * Revert these Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
@@ -44,8 +44,8 @@ func (k *Kubernetes) Federations(state request.Request, fname, fzone string) (ms
|
||||
}
|
||||
|
||||
if r.endpoint == "" {
|
||||
return msg.Service{Host: dnsutil.Join([]string{r.service, r.namespace, fname, r.podOrSvc, lz, lr, fzone})}, nil
|
||||
return msg.Service{Host: dnsutil.Join(r.service, r.namespace, fname, r.podOrSvc, lz, lr, fzone)}, nil
|
||||
}
|
||||
|
||||
return msg.Service{Host: dnsutil.Join([]string{r.endpoint, r.service, r.namespace, fname, r.podOrSvc, lz, lr, fzone})}, nil
|
||||
return msg.Service{Host: dnsutil.Join(r.endpoint, r.service, r.namespace, fname, r.podOrSvc, lz, lr, fzone)}, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user