Simplify if block in fromAPIRecord

This commit is contained in:
Alexandre Almeida 2025-06-07 15:31:25 +02:00
parent 08474842cc
commit 44cf557ad2

View File

@ -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)
}