1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

fix unused params in: providers/vultr

This commit is contained in:
Tom Limoncelli
2024-03-04 10:25:32 -05:00
parent 9d9219ea14
commit e589a8e1fc
2 changed files with 4 additions and 4 deletions

View File

@ -65,7 +65,7 @@ func TestConversion(t *testing.T) {
t.Error("Error converting Vultr record", record)
}
converted := toVultrRecord(dc, rc, "0")
converted := toVultrRecord(rc, "0")
if converted.Type != record.Type || converted.Name != record.Name || converted.Data != record.Data || (converted.Priority != record.Priority) || converted.TTL != record.TTL {
t.Error("Vultr record conversion mismatch", record, rc, converted)

View File

@ -137,7 +137,7 @@ func (api *vultrProvider) GetZoneRecordsCorrections(dc *models.DomainConfig, cur
case diff2.REPORT:
corrections = append(corrections, &models.Correction{Msg: change.MsgsJoined})
case diff2.CREATE:
r := toVultrRecord(dc, change.New[0], "0")
r := toVultrRecord(change.New[0], "0")
corrections = append(corrections, &models.Correction{
Msg: change.Msgs[0],
F: func() error {
@ -146,7 +146,7 @@ func (api *vultrProvider) GetZoneRecordsCorrections(dc *models.DomainConfig, cur
},
})
case diff2.CHANGE:
r := toVultrRecord(dc, change.New[0], change.Old[0].Original.(govultr.DomainRecord).ID)
r := toVultrRecord(change.New[0], change.Old[0].Original.(govultr.DomainRecord).ID)
corrections = append(corrections, &models.Correction{
Msg: fmt.Sprintf("%s; Vultr RecordID: %v", change.Msgs[0], r.ID),
F: func() error {
@ -271,7 +271,7 @@ func toRecordConfig(domain string, r govultr.DomainRecord) (*models.RecordConfig
}
// toVultrRecord converts a RecordConfig converted by toRecordConfig back to a Vultr DomainRecordReq. #rtype_variations
func toVultrRecord(dc *models.DomainConfig, rc *models.RecordConfig, vultrID string) *govultr.DomainRecord {
func toVultrRecord(rc *models.RecordConfig, vultrID string) *govultr.DomainRecord {
name := rc.GetLabel()
// Vultr uses a blank string to represent the apex domain.
if name == "@" {