mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
NEW FEATURE: NO_PURGE reports what is not purged (diff2 only) (#2031)
This commit is contained in:
@@ -161,6 +161,8 @@ func (c *porkbunProvider) GetDomainCorrections(dc *models.DomainConfig) ([]*mode
|
||||
for _, change := range changes {
|
||||
var corr *models.Correction
|
||||
switch change.Type {
|
||||
case diff2.REPORT:
|
||||
corr = &models.Correction{Msg: change.MsgsJoined}
|
||||
case diff2.CREATE:
|
||||
req, err := toReq(change.New[0])
|
||||
if err != nil {
|
||||
@@ -192,6 +194,8 @@ func (c *porkbunProvider) GetDomainCorrections(dc *models.DomainConfig) ([]*mode
|
||||
return c.deleteRecord(dc.Name, id)
|
||||
},
|
||||
}
|
||||
default:
|
||||
panic(fmt.Sprintf("unhandled change.Type %s", change.Type))
|
||||
}
|
||||
corrections = append(corrections, corr)
|
||||
}
|
||||
|
Reference in New Issue
Block a user