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:
@ -109,7 +109,7 @@ func rrFormat(zonename string, filename string, r io.Reader, defaultTTL uint32,
|
||||
if !dsl { // TSV format:
|
||||
fmt.Printf("%s\t%s\t%s\t%s\t%s\n", name, ttl, classStr, typeStr, target)
|
||||
} else { // DSL format:
|
||||
switch hdr.Rrtype {
|
||||
switch hdr.Rrtype { // #rtype_variations
|
||||
case dns.TypeMX:
|
||||
m := strings.SplitN(target, "\t", 2)
|
||||
target = m[0] + ", '" + m[1] + "'"
|
||||
|
Reference in New Issue
Block a user