mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
Make it easier to add new Rtypes. (#169)
* NEW: docs/adding-new-rtypes.md * Mark all "if" and "switch" statements with `#rtype_variations` * Make consistent use of `default: panic()`
This commit is contained in:
@ -88,7 +88,7 @@ func rrToRecord(rr dns.RR, origin string, replaceSerial uint32) (models.RecordCo
|
||||
rc.NameFQDN = strings.ToLower(strings.TrimSuffix(header.Name, "."))
|
||||
rc.Name = strings.ToLower(dnsutil.TrimDomainName(header.Name, origin))
|
||||
rc.TTL = header.Ttl
|
||||
switch v := rr.(type) {
|
||||
switch v := rr.(type) { // #rtype_variations
|
||||
case *dns.A:
|
||||
rc.Target = v.A.String()
|
||||
case *dns.AAAA:
|
||||
|
Reference in New Issue
Block a user