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:
@@ -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
|
||||
|
Reference in New Issue
Block a user