From d21fd33167b7fc8ead5fae2889d03821203cbb4f Mon Sep 17 00:00:00 2001 From: Francesco Calcavecchia Date: Sat, 11 Jan 2025 14:10:23 +0100 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Quentin McGaw --- internal/provider/providers/scaleway/provider.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/internal/provider/providers/scaleway/provider.go b/internal/provider/providers/scaleway/provider.go index 3f880ef7d..8f5c2b065 100644 --- a/internal/provider/providers/scaleway/provider.go +++ b/internal/provider/providers/scaleway/provider.go @@ -68,8 +68,7 @@ func validateSettings(domain, secretKey string) (err error) { return fmt.Errorf("%w: %w", errors.ErrDomainNotValid, err) } - switch { - case secretKey == "": + if secretKey == "" { return fmt.Errorf("%w", errors.ErrSecretKeyNotSet) } @@ -114,7 +113,7 @@ func (p *Provider) HTML() models.HTMLRow { } // Update updates the DNS record for the domain using Scaleway's API. -// See: https://www.scaleway.com/en/developers/api/domains-and-dns/#path-records-update-records-within-a-dns-zone +// See https://www.scaleway.com/en/developers/api/domains-and-dns/#path-records-update-records-within-a-dns-zone func (p *Provider) Update(ctx context.Context, client *http.Client, ip netip.Addr) (newIP netip.Addr, err error) { u := url.URL{ Scheme: "https",