From 33c90506539a6d5e0c0003d5e7832f9293deeed3 Mon Sep 17 00:00:00 2001 From: Sense T Date: Tue, 9 Apr 2024 07:58:27 +0800 Subject: [PATCH] SOA Email Format --- models/domain.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/models/domain.go b/models/domain.go index c3b25d2..a792b34 100644 --- a/models/domain.go +++ b/models/domain.go @@ -17,6 +17,7 @@ type Domain struct { } func (d *Domain) EmailSOAForamt() string { - soa := strings.Replace(d.AdminEmail, ".", "\\", 1) - return strings.Replace(soa, "@", ".", 1) + s := strings.Split(d.AdminEmail, "@") + s[0] = strings.Replace(s[0], ".", "\\", -1) + return strings.Join(s, ".") }