aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--commands/account/compose.go2
-rw-r--r--worker/lib/parse.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/commands/account/compose.go b/commands/account/compose.go
index e61b593d..ad48fe61 100644
--- a/commands/account/compose.go
+++ b/commands/account/compose.go
@@ -53,7 +53,7 @@ func buildBody(args []string) (string, error) {
for _, opt := range opts {
switch opt.Option {
case 'H':
- if strings.Index(opt.Value, ":") != -1 {
+ if strings.Contains(opt.Value, ":") {
// ensure first colon is followed by a single space
re := regexp.MustCompile(`^(.*?):\s*(.*)`)
headers += re.ReplaceAllString(opt.Value, "$1: $2") + "\n"
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