aboutsummaryrefslogtreecommitdiff
path: root/middleware/file/dname.go
diff options
context:
space:
mode:
authorGravatar Miek Gieben <miek@miek.nl> 2017-08-19 15:22:09 +0100
committerGravatar GitHub <noreply@github.com> 2017-08-19 15:22:09 +0100
commit02955d7594c84c5cd320ff0190ecd26425db5217 (patch)
treefed08b82ac41fe3fb77c8a3c2e781975c3e7793c /middleware/file/dname.go
parent7c343982a6dbefc0291e0b7ecaf64d8e32124bbc (diff)
downloadcoredns-02955d7594c84c5cd320ff0190ecd26425db5217.tar.gz
coredns-02955d7594c84c5cd320ff0190ecd26425db5217.tar.zst
coredns-02955d7594c84c5cd320ff0190ecd26425db5217.zip
Dns.join (#944)
* Add dnsutil.Join * Create dnsutil.Join Create Join helper function and move bits in the code over.
Diffstat (limited to 'middleware/file/dname.go')
-rw-r--r--middleware/file/dname.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/middleware/file/dname.go b/middleware/file/dname.go
index e4c29c77d..6bbfd9377 100644
--- a/middleware/file/dname.go
+++ b/middleware/file/dname.go
@@ -1,7 +1,7 @@
package file
import (
- "strings"
+ "github.com/coredns/coredns/middleware/pkg/dnsutil"
"github.com/miekg/dns"
)
@@ -14,7 +14,7 @@ func substituteDNAME(qname, owner, target string) string {
labels := dns.SplitDomainName(qname)
labels = append(labels[0:len(labels)-dns.CountLabel(owner)], dns.SplitDomainName(target)...)
- return strings.Join(labels, ".") + "."
+ return dnsutil.Join(labels)
}
return ""