CHORE: Fix broken merge (#1957)

This commit is contained in:
Tom Limoncelli 2023-01-19 16:41:17 -05:00 committed by GitHub
parent 8c8d08b72f
commit f4388dd6ad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -130,11 +130,10 @@ func (hp *hostingdeProvider) GetDomainCorrections(dc *models.DomainConfig) ([]*m
var create, del, mod diff.Changeset
if !diff2.EnableDiff2 {
differ = diff.New(dc)
_, create, del, mod, err = diff.New(dc).IncrementalDiff(records)
} else {
differ = diff.NewCompat(dc)
_, create, del, mod, err = diff.NewCompat(dc).IncrementalDiff(records)
}
_, create, del, mod, err = differ.IncrementalDiff(records)
if err != nil {
return nil, err
}
@ -153,7 +152,7 @@ func (hp *hostingdeProvider) GetDomainCorrections(dc *models.DomainConfig) ([]*m
return nil, nil
}
corrections = []*models.Correction{
corrections := []*models.Correction{
{
Msg: fmt.Sprintf("\n%s", strings.Join(msg, "\n")),
F: func() error {
@ -176,24 +175,6 @@ func (hp *hostingdeProvider) GetDomainCorrections(dc *models.DomainConfig) ([]*m
},
}
msg := []string{}
for _, c := range append(del, append(create, mod...)...) {
msg = append(msg, c.String())
}
if len(create) == 0 && len(del) == 0 && len(mod) == 0 {
return nil, nil
}
corrections := []*models.Correction{
{
Msg: fmt.Sprintf("\n%s", strings.Join(msg, "\n")),
F: func() error {
return hp.updateRecords(dc.Name, create, del, mod)
},
},
}
return corrections, nil
}