DOMAINNAMESHOP: Adopt diff2 in compatibility mode
@@ -48,10 +48,14 @@ func (api *domainNameShopProvider) GetDomainCorrections(dc *models.DomainConfig)
}
var corrections []*models.Correction
- if !diff2.EnableDiff2 || true { // Remove "|| true" when diff2 version arrives
-
+ var create, delete, modify diff.Changeset
+ if !diff2.EnableDiff2 {
differ := diff.New(dc)
- _, create, delete, modify, err := differ.IncrementalDiff(existingRecords)
+ _, create, delete, modify, err = differ.IncrementalDiff(existingRecords)
+ } else {
+ differ := diff.NewCompat(dc)
+ _, create, delete, modify, err = differ.IncrementalDiff(existingRecords)
+ }
if err != nil {
return nil, err
}
@@ -107,11 +111,6 @@ func (api *domainNameShopProvider) GetDomainCorrections(dc *models.DomainConfig)
return corrections, nil
}
- // Insert Future diff2 version here.
-
- return corrections, nil
-}
-
func (api *domainNameShopProvider) GetNameservers(domain string) ([]*models.Nameserver, error) {
ns, err := api.getNS(domain)
if err != nil {
