From 539d7a8d974d8bacb020d485c8647aaabaa88833 Mon Sep 17 00:00:00 2001 From: Monviech <79600909+Monviech@users.noreply.github.com> Date: Thu, 6 Jun 2024 16:01:17 +0200 Subject: [PATCH] chore: update to libdns/libdns v0.2.2 - fix build errors with caddy v2.8.0+ (#3) * chore: update to libdns/libdns v0.2.2 * cleanup: fix build error with libdns v0.2.2 --- go.mod | 2 +- go.sum | 4 ++-- models.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index 2e2ee69..0129e54 100644 --- a/go.mod +++ b/go.mod @@ -2,6 +2,6 @@ module github.com/libdns/directadmin go 1.18 -require github.com/libdns/libdns v0.2.1 +require github.com/libdns/libdns v0.2.2 require github.com/joho/godotenv v1.5.1 diff --git a/go.sum b/go.sum index 7f1e021..09c88fc 100644 --- a/go.sum +++ b/go.sum @@ -1,4 +1,4 @@ github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= -github.com/libdns/libdns v0.2.1 h1:Wu59T7wSHRgtA0cfxC+n1c/e+O3upJGWytknkmFEDis= -github.com/libdns/libdns v0.2.1/go.mod h1:yQCXzk1lEZmmCPa857bnk4TsOiqYasqpyOEeSObbb40= +github.com/libdns/libdns v0.2.2 h1:O6ws7bAfRPaBsgAYt8MDe2HcNBGC29hkZ9MX2eUSX3s= +github.com/libdns/libdns v0.2.2/go.mod h1:4Bj9+5CQiNMVGf87wjX4CY3HQJypUHRuLvlsfsZqLWQ= diff --git a/models.go b/models.go index 7f94c5d..585da2a 100644 --- a/models.go +++ b/models.go @@ -55,7 +55,7 @@ func (r daRecord) libdnsRecord(zone string) (libdns.Record, error) { return record, fmt.Errorf("failed to parse MX priority for %v: %v", r.Name, err) } - record.Priority = priority + record.Priority = uint(priority) record.Value = fmt.Sprintf("%v.%v", splits[1], zone) case "SRV": return record, ErrUnsupported