aboutsummaryrefslogtreecommitdiff
path: root/lib/smtp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/smtp')
-rw-r--r--lib/smtp/smtp.go10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/smtp/smtp.go b/lib/smtp/smtp.go
index f7121280..4a91079a 100644
--- a/lib/smtp/smtp.go
+++ b/lib/smtp/smtp.go
@@ -7,6 +7,7 @@ package smtp
import (
"bytes"
"errors"
+ "slices"
"git.sr.ht/~shulhan/pakakeh.go/lib/ascii"
)
@@ -207,12 +208,9 @@ func parseLocalDomain(data []byte, allow []byte) (out []byte) {
continue
}
found = false
- for _, c := range allow {
- if c == data[x] {
- out = append(out, data[x])
- found = true
- break
- }
+ if slices.Contains(allow, data[x]) {
+ out = append(out, data[x])
+ found = true
}
if found {
continue