aboutsummaryrefslogtreecommitdiff
path: root/worker/lib/parse.go
diff options
context:
space:
mode:
authorWagner Riffel <wgrriffel@gmail.com>2019-09-03 16:34:05 -0300
committerDrew DeVault <sir@cmpwn.com>2019-09-04 16:30:57 -1000
commitbaa70469c3b25e1b937c9c2a9e0b16762a227bca (patch)
tree6b60bf9de08ba6101b2b0a54cf12e917eef3f6c5 /worker/lib/parse.go
parentfeacca3c5caffb11be1f5f7cbfef01400b5bc944 (diff)
all: rewrite references to strings.Index to strings.Contains
Signed-off-by: Wagner Riffel <wgrriffel@gmail.com>
Diffstat (limited to 'worker/lib/parse.go')
-rw-r--r--worker/lib/parse.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/worker/lib/parse.go b/worker/lib/parse.go
index 9f9fa62..df9683a 100644
--- a/worker/lib/parse.go
+++ b/worker/lib/parse.go
@@ -173,7 +173,7 @@ func parseAddressList(h *mail.Header, key string) ([]*models.Address, error) {
var converted []*models.Address
addrs, err := h.AddressList(key)
if err != nil {
- if hdr, err := h.Text(key); err != nil && strings.Index(hdr, "@") < 0 {
+ if hdr, err := h.Text(key); err != nil && strings.Contains(hdr, "@") {
return []*models.Address{&models.Address{
Name: hdr,
}}, nil