Browse Source

Turn encodeKVasRFC1464 into a plain function

pull/3513/head
Patrick Sodré 7 years ago committed by Frank Schroeder
parent
commit
865f087ec9
No known key found for this signature in database
GPG Key ID: 4D65C6EAEC87DECD
  1. 4
      agent/dns.go

4
agent/dns.go

@ -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{

Loading…
Cancel
Save