mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
RecordConfig string shouldn't panic.
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user