From 552bb7636a6bbaf7fbc00987d0e47ed9b9d53b55 Mon Sep 17 00:00:00 2001 From: Tom Limoncelli Date: Wed, 18 Dec 2024 12:36:25 -0500 Subject: [PATCH] fix_sak --- pkg/diff2/diff2.go | 4 ++-- providers/sakuracloud/records.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/diff2/diff2.go b/pkg/diff2/diff2.go index 83ff999f65..4c94adddaa 100644 --- a/pkg/diff2/diff2.go +++ b/pkg/diff2/diff2.go @@ -195,13 +195,13 @@ func ByRecord(existing models.Records, dc *models.DomainConfig, compFunc Compara // // Example usage: // -// msgs, changes, err := diff2.ByZone(foundRecords, dc, nil) +// result, err := diff2.ByZone(foundRecords, dc, nil) // if err != nil { // return nil, err // } // if changes { // // Generate a "correction" that uploads the entire zone. -// // (dc.Records are the new records for the zone). +// // (result.DesiredPlus are the new records for the zone). // } // // Example providers include: BIND, AUTODNS diff --git a/providers/sakuracloud/records.go b/providers/sakuracloud/records.go index f029f22e24..d29c642b75 100644 --- a/providers/sakuracloud/records.go +++ b/providers/sakuracloud/records.go @@ -79,8 +79,8 @@ func (s *sakuracloudProvider) GetZoneRecordsCorrections(dc *models.DomainConfig, &models.Correction{ Msg: msg, F: func() error { - drs := make([]domainRecord, 0, len(dc.Records)) - for _, rc := range dc.Records { + drs := make([]domainRecord, 0, len(result.DesiredPlus)) + for _, rc := range result.DesiredPlus { drs = append(drs, toNative(rc)) } return s.api.UpdateZone(dc.Name, drs)