mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-11-10 09:12:47 +08:00
CHORE: Fix broken merge (#1957)
This commit is contained in:
parent
8c8d08b72f
commit
f4388dd6ad
1 changed files with 3 additions and 22 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue