Simplify if block in fromAPIRecord
This commit is contained in:
parent
08474842cc
commit
44cf557ad2
1 changed files with 1 additions and 3 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue