1
0
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:
Craig Peterson
2017-03-27 16:03:01 -06:00
committed by GitHub
parent efb8e9bbf4
commit d205c8b4ed
6 changed files with 104 additions and 27 deletions

View File

@@ -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)