Skip to content

Commit

Permalink
fix: use gofumpt
Browse files Browse the repository at this point in the history
  • Loading branch information
vanonox committed Apr 27, 2021
1 parent d5fca4a commit a083ed6
Showing 1 changed file with 1 addition and 29 deletions.
30 changes: 1 addition & 29 deletions providers/dns/scaleway/scaleway.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,32 +106,6 @@ func (d *DNSProvider) Timeout() (timeout, interval time.Duration) {
return d.config.PropagationTimeout, d.config.PollingInterval
}

func convertRecordType(recordType string) scalewayDNS.RecordType {

switch recordType {
case "A":
return scalewayDNS.RecordTypeA
case "AAAA":
return scalewayDNS.RecordTypeAAAA
case "CNAME":
return scalewayDNS.RecordTypeCNAME
case "TXT":
return scalewayDNS.RecordTypeTXT
case "SRV":
return scalewayDNS.RecordTypeSRV
case "TLSA":
return scalewayDNS.RecordTypeTLSA
case "MX":
return scalewayDNS.RecordTypeMX
case "CAA":
return scalewayDNS.RecordTypeCAA
case "ALIAS":
return scalewayDNS.RecordTypeALIAS
default:
return scalewayDNS.RecordTypeUnknown
}
}

// Present creates a TXT record to fulfill DNS-01 challenge.
func (d *DNSProvider) Present(domain, token, keyAuth string) error {
fqdn, value := dns01.GetRecord(domain, keyAuth)
Expand All @@ -140,7 +114,7 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
request := scalewayDNS.RecordChange{
Add: &scalewayDNS.RecordChangeAdd{
Records: []*scalewayDNS.Record{
&scalewayDNS.Record{
{
Data: fmt.Sprintf(`"%s"`, value),
Name: fqdn,
TTL: uint32(d.config.TTL),
Expand All @@ -159,7 +133,6 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
ReturnAllRecords: &returnAllRecords,
},
)

if err != nil {
return fmt.Errorf("scaleway: %w", err)
}
Expand Down Expand Up @@ -189,7 +162,6 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
ReturnAllRecords: &returnAllRecords,
},
)

if err != nil {
return fmt.Errorf("scaleway: %w", err)
}
Expand Down

0 comments on commit a083ed6

Please sign in to comment.