mirror of
https://github.com/coredns/coredns.git
synced 2025-10-27 08:14:18 -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:
@@ -26,7 +26,7 @@ func Domain(s string) string {
|
||||
for i, j := 1, len(l)-1; i < j; i, j = i+1, j-1 {
|
||||
l[i], l[j] = l[j], l[i]
|
||||
}
|
||||
return dnsutil.Join(l[1 : len(l)-1])
|
||||
return dnsutil.Join(l[1 : len(l)-1]...)
|
||||
}
|
||||
|
||||
// PathWithWildcard ascts as Path, but if a name contains wildcards (* or any), the name will be
|
||||
|
||||
Reference in New Issue
Block a user