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

more deadcode

This commit is contained in:
Tom Limoncelli
2023-11-12 22:05:16 -05:00
parent c7791dcacd
commit 8f4595fd45
3 changed files with 15 additions and 24 deletions

View File

@ -3,6 +3,8 @@ package models
import (
"fmt"
"net"
"github.com/StackExchange/dnscontrol/v4/pkg/txtutil"
)
// PopulateFromString populates a RecordConfig given a type and string. Many
@ -70,10 +72,11 @@ func (rc *RecordConfig) PopulateFromString(rtype, contents, origin string) error
case "SOA":
return rc.SetTargetSOAString(contents)
case "SPF", "TXT":
// Parsing the contents may be unexpected. If your provider gives you a
// string that needs no further parsing, special case TXT and use
// rc.SetTargetTXT(target) like in the example above.
return rc.SetTargetTXTs(ParseQuotedTxt(contents))
t, err := txtutil.ParseQuoted(contents)
if err != nil {
return err
}
return rc.SetTargetTXT(t)
case "SRV":
return rc.SetTargetSRVString(contents)
case "SSHFP":