diff options
author | Wagner Riffel <wgrriffel@gmail.com> | 2019-09-03 16:34:05 -0300 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-09-04 16:30:57 -1000 |
commit | baa70469c3b25e1b937c9c2a9e0b16762a227bca (patch) | |
tree | 6b60bf9de08ba6101b2b0a54cf12e917eef3f6c5 /commands | |
parent | feacca3c5caffb11be1f5f7cbfef01400b5bc944 (diff) | |
download | aerc-baa70469c3b25e1b937c9c2a9e0b16762a227bca.tar.gz |
all: rewrite references to strings.Index to strings.Contains
Signed-off-by: Wagner Riffel <wgrriffel@gmail.com>
Diffstat (limited to 'commands')
-rw-r--r-- | commands/account/compose.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/commands/account/compose.go b/commands/account/compose.go index e61b593..ad48fe6 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" |