commit 700d531a2cbc612ee9e9c9843a01ae1f5e487969
parent 713f577a275174c2450fff4f24e454819f6144be
Author: bogem <albertnigma@gmail.com>
Date: Mon, 21 Nov 2016 22:57:38 +0100
helpers: Use iterate operator by int in Emojify
Fix golint warning: helpers/emoji.go:56:4: should replace start += 1
with start++
See #2014
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/helpers/emoji.go b/helpers/emoji.go
@@ -53,7 +53,7 @@ func Emojify(source []byte) []byte {
nextWordDelim := bytes.Index(source[j:upper], emojiWordDelim)
if endEmoji < 0 {
- start += 1
+ start++
} else if endEmoji == 0 || (nextWordDelim != -1 && nextWordDelim < endEmoji) {
start += endEmoji + 1
} else {