1
0
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:
Tom Limoncelli
2023-02-01 07:27:00 -05:00
committed by GitHub
parent bbabf66113
commit de202531cb
12 changed files with 87 additions and 10 deletions

View File

@@ -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)
}