From baa70469c3b25e1b937c9c2a9e0b16762a227bca Mon Sep 17 00:00:00 2001 From: Wagner Riffel Date: Tue, 3 Sep 2019 16:34:05 -0300 Subject: all: rewrite references to strings.Index to strings.Contains Signed-off-by: Wagner Riffel --- worker/lib/parse.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'worker/lib') diff --git a/worker/lib/parse.go b/worker/lib/parse.go index 9f9fa62e..df9683aa 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 -- cgit