Display changes, even if upstream has no records. (#2531)

Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
This commit is contained in:
tomf 2023-08-24 14:29:27 +00:00 committed by GitHub
parent c2eb98993c
commit a7fe17a29c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -178,12 +178,6 @@ func ByRecord(existing models.Records, dc *models.DomainConfig, compFunc Compara
// //
// Example providers include: BIND, AUTODNS // Example providers include: BIND, AUTODNS
func ByZone(existing models.Records, dc *models.DomainConfig, compFunc ComparableFunc) ([]string, bool, error) { func ByZone(existing models.Records, dc *models.DomainConfig, compFunc ComparableFunc) ([]string, bool, error) {
if len(existing) == 0 {
// Nothing previously existed. No need to output a list of individual changes.
return nil, true, nil
}
// Only return the messages. The caller has the list of records needed to build the new zone. // Only return the messages. The caller has the list of records needed to build the new zone.
instructions, err := byHelper(analyzeByRecord, existing, dc, compFunc) instructions, err := byHelper(analyzeByRecord, existing, dc, compFunc)
changes := false changes := false