mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
Adding gandi to integration suite. Fixing bugs. (#57)
* Adding gandi to integration suite. Fixing bugs. Fixes #35 Fixes #36 * small fixes * gandi docs
This commit is contained in:
@@ -191,6 +191,17 @@ func (dc *DomainConfig) Punycode() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// CombineMXs will merge the priority into the target field for all mx records.
|
||||
// Useful for providers that desire them as one field.
|
||||
func (dc *DomainConfig) CombineMXs() {
|
||||
for _, rec := range dc.Records {
|
||||
if rec.Type == "MX" {
|
||||
rec.Target = fmt.Sprintf("%d %s", rec.Priority, rec.Target)
|
||||
rec.Priority = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func copyObj(input interface{}, output interface{}) error {
|
||||
buf := &bytes.Buffer{}
|
||||
enc := gob.NewEncoder(buf)
|
||||
|
Reference in New Issue
Block a user