mirror of
https://github.com/coredns/coredns.git
synced 2025-12-07 19:05:19 -05: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:
@@ -61,7 +61,7 @@ Services:
|
||||
// Chop of left most label, because that is used as the nameserver place holder
|
||||
// and drop the right most labels that belong to zone.
|
||||
// We must *also* chop of dns.stub. which means cutting two more labels.
|
||||
domain = dnsutil.Join(labels[1 : len(labels)-dns.CountLabel(z)-2])
|
||||
domain = dnsutil.Join(labels[1 : len(labels)-dns.CountLabel(z)-2]...)
|
||||
if domain == z {
|
||||
log.Warningf("Skipping nameserver for domain we are authoritative for: %s", domain)
|
||||
continue Services
|
||||
|
||||
Reference in New Issue
Block a user