Turn encodeKVasRFC1464 into a plain function

This commit is contained in:
Patrick Sodré 2017-08-10 17:55:50 -04:00 committed by Frank Schroeder
parent 12fb0bfd5b
commit 865f087ec9
No known key found for this signature in database
GPG Key ID: 4D65C6EAEC87DECD
1 changed files with 2 additions and 2 deletions

View File

@ -537,7 +537,7 @@ RPC:
}
// encodeKVasRFC1464 encodes a key-value pair according to RFC1464
func (d *DNSServer) encodeKVasRFC1464(key, value string) (txt string) {
func encodeKVasRFC1464(key, value string) (txt string) {
txt = key + "=" + value
return txt
}
@ -608,7 +608,7 @@ func (d *DNSServer) formatNodeRecord(node *structs.Node, addr, qName string, qTy
for key, value := range node.Meta {
txt := value
if !strings.HasPrefix(strings.ToLower(key), "rfc1035-") {
txt = d.encodeKVasRFC1464(key, value)
txt = encodeKVasRFC1464(key, value)
}
records = append(records, &dns.TXT{
Hdr: dns.RR_Header{