1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

move txt encode/decode to txtutil

This commit is contained in:
Tom Limoncelli
2023-11-12 14:26:27 -05:00
parent 675a44619d
commit 6448fc5a8e
11 changed files with 41 additions and 240 deletions

View File

@ -4,6 +4,7 @@ package models
import (
"fmt"
"os"
"strings"
"github.com/miekg/dns"
@ -97,6 +98,7 @@ func RRtoRC(rr dns.RR, origin string) (RecordConfig, error) {
case *dns.TLSA:
err = rc.SetTargetTLSA(v.Usage, v.Selector, v.MatchingType, v.Certificate)
case *dns.TXT:
fmt.Fprintf(os.Stdout, "DEBUG: RRtoRC TXT inboundv=%v\n", v.Txt)
err = rc.SetTargetTXTs(v.Txt)
default:
return *rc, fmt.Errorf("rrToRecord: Unimplemented zone record type=%s (%v)", rc.Type, rr)