1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

CHORE: Remove diff1 from codebase (#2575)

This commit is contained in:
Tom Limoncelli
2023-10-22 13:56:13 -04:00
committed by GitHub
parent d3b358470d
commit c91fe6c1c8
63 changed files with 305 additions and 3214 deletions

View File

@@ -5,7 +5,6 @@ import (
"github.com/StackExchange/dnscontrol/v4/models"
"github.com/StackExchange/dnscontrol/v4/pkg/diff"
"github.com/StackExchange/dnscontrol/v4/pkg/diff2"
)
// GetZoneRecords gets the records of a zone and returns them in RecordConfig format.
@@ -79,18 +78,12 @@ func (client *providerClient) GetNameservers(domain string) ([]*models.Nameserve
func (client *providerClient) GetZoneRecordsCorrections(dc *models.DomainConfig, foundRecords models.Records) ([]*models.Correction, error) {
//txtutil.SplitSingleLongTxt(dc.Records) // Autosplit long TXT records
var corrections []*models.Correction
var err error
var differ diff.Differ
if !diff2.EnableDiff2 {
differ = diff.New(dc)
} else {
differ = diff.NewCompat(dc)
}
_, creates, dels, modifications, err := differ.IncrementalDiff(foundRecords)
toReport, creates, dels, modifications, err := diff.NewCompat(dc).IncrementalDiff(foundRecords)
if err != nil {
return nil, err
}
// Start corrections with the reports
corrections := diff.GenerateMessageCorrections(toReport)
// CSCGlobal has a unique API. A list of edits is sent in one API
// call. Edits aren't permitted if an existing edit is being