Simplify if block in fromAPIRecord
This commit is contained in:
parent
08474842cc
commit
37a7834a18
@ -26,9 +26,7 @@ func fromAPIRecord(r govultr.DomainRecord, zone string) VultrRecord {
|
|||||||
|
|
||||||
// Vultr uses a custom priority field for MX and SRV records
|
// Vultr uses a custom priority field for MX and SRV records
|
||||||
data := r.Data
|
data := r.Data
|
||||||
if r.Type == "MX" {
|
if r.Type == "MX" || r.Type == "SRV" {
|
||||||
data = fmt.Sprintf("%d %s", r.Priority, r.Data)
|
|
||||||
} else if r.Type == "SRV" {
|
|
||||||
data = fmt.Sprintf("%d %s", r.Priority, r.Data)
|
data = fmt.Sprintf("%d %s", r.Priority, r.Data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user