Set priority 10 to MX records

This commit is contained in:
Balakrishnan Balasubramanian 2024-04-22 23:13:42 -04:00
parent 581d6613cc
commit 70ff03f233
2 changed files with 5 additions and 4 deletions

2
go.mod
View File

@ -1,6 +1,6 @@
module go.balki.me/cloudflare-dns-cli module go.balki.me/cloudflare-dns-cli
go 1.22.1 go 1.22.2
require ( require (
github.com/libdns/cloudflare v0.1.1 github.com/libdns/cloudflare v0.1.1

View File

@ -33,9 +33,10 @@ func genRecord() (libdns.Record, error) {
case cname != "": case cname != "":
if mx { if mx {
return libdns.Record{ return libdns.Record{
Type: "MX", Type: "MX",
Name: sub, Name: sub,
Value: cname, Value: cname,
Priority: 10,
}, nil }, nil
} else { } else {
return libdns.Record{ return libdns.Record{