From 44cf557ad27c8e5a7cc6264da046bbf88f6413ec Mon Sep 17 00:00:00 2001 From: Alexandre Almeida <1251067+Xinayder@users.noreply.github.com> Date: Sat, 7 Jun 2025 15:31:25 +0200 Subject: [PATCH] Simplify if block in fromAPIRecord --- helpers.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/helpers.go b/helpers.go index 48533c8..047bd19 100644 --- a/helpers.go +++ b/helpers.go @@ -26,9 +26,7 @@ func fromAPIRecord(r govultr.DomainRecord, zone string) VultrRecord { // Vultr uses a custom priority field for MX and SRV records data := r.Data - if r.Type == "MX" { - data = fmt.Sprintf("%d %s", r.Priority, r.Data) - } else if r.Type == "SRV" { + if r.Type == "MX" || r.Type == "SRV" { data = fmt.Sprintf("%d %s", r.Priority, r.Data) }