From baf045d0ab5219dd784e3064e2c6422222da6cea Mon Sep 17 00:00:00 2001 From: Craig Peterson Date: Tue, 1 Aug 2017 08:52:58 -0400 Subject: [PATCH] RecordConfig string shouldn't panic. --- models/dns.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/models/dns.go b/models/dns.go index 1a906c687..c40a4ec5f 100644 --- a/models/dns.go +++ b/models/dns.go @@ -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)