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

BUG: Fix all err scopes (#2160)

This commit is contained in:
Tom Limoncelli
2023-03-13 14:19:19 -04:00
committed by GitHub
parent f19225f8d4
commit 0491aadd36
19 changed files with 62 additions and 75 deletions

View File

@ -193,13 +193,13 @@ func (n *netlifyProvider) GetDomainCorrections(dc *models.DomainConfig) ([]*mode
var corrections []*models.Correction
var create, del, modify diff.Changeset
var differ diff.Differ
if !diff2.EnableDiff2 {
differ := diff.New(dc)
_, create, del, modify, err = differ.IncrementalDiff(records)
differ = diff.New(dc)
} else {
differ := diff.NewCompat(dc)
_, create, del, modify, err = differ.IncrementalDiff(records)
differ = diff.NewCompat(dc)
}
_, create, del, modify, err = differ.IncrementalDiff(records)
if err != nil {
return nil, err
}