mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-02-25 16:13:04 +08:00
RecordConfig string shouldn't panic.
This commit is contained in:
parent
e5d16a763f
commit
baf045d0ab
1 changed files with 1 additions and 3 deletions
|
@ -86,8 +86,6 @@ func (r *RecordConfig) String() (content string) {
|
|||
|
||||
content = fmt.Sprintf("%s %s %s %d", r.Type, r.NameFQDN, r.Target, r.TTL)
|
||||
switch r.Type {
|
||||
case "A", "AAAA", "PTR", "TXT":
|
||||
//
|
||||
case "MX":
|
||||
content += fmt.Sprintf(" priority=%d", r.MxPreference)
|
||||
case "SOA":
|
||||
|
@ -95,7 +93,7 @@ func (r *RecordConfig) String() (content string) {
|
|||
case "CAA":
|
||||
content += fmt.Sprintf(" caatag=%s caaflag=%d", r.CaaTag, r.CaaFlag)
|
||||
default:
|
||||
panic(fmt.Sprintf("rc.String rtype %v unimplemented", r.Type))
|
||||
// assume nothing special for A,CNAME,AAAA, and other simple types.
|
||||
}
|
||||
for k, v := range r.Metadata {
|
||||
content += fmt.Sprintf(" %s=%s", k, v)
|
||||
|
|
Loading…
Reference in a new issue