helpers: Use iterate operator by int in Emojify
authorbogem <albertnigma@gmail.com>
Mon, 21 Nov 2016 21:57:38 +0000 (22:57 +0100)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Wed, 23 Nov 2016 08:13:00 +0000 (09:13 +0100)
Fix golint warning: helpers/emoji.go:56:4: should replace start += 1
with start++

See #2014

helpers/emoji.go

index f945286500a7c28ade796611c62db1eb3603c34b..31cd29deb44c6ad1057b93b75f7899b3fcf6ba2a 100644 (file)
@@ -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 {