Skip to content

Commit 02032f2

Browse files
authored
run go fix (#105)
1 parent c28f274 commit 02032f2

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

keybot/winbot.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -355,12 +355,13 @@ func (d *winbot) Run(bot *slackbot.Bot, channel string, args []string) (string,
355355
index = lineCount % numLogLines
356356
lineCount = numLogLines
357357
}
358-
snippet := "```\n"
358+
var snippet strings.Builder
359+
snippet.WriteString("```\n")
359360
for i := 0; i < lineCount; i++ {
360-
snippet += lines[(i+index)%numLogLines] + "\n"
361+
snippet.WriteString(lines[(i+index)%numLogLines] + "\n")
361362
}
362-
snippet += "```"
363-
bot.SendMessage(snippet, channel)
363+
snippet.WriteString("```")
364+
bot.SendMessage(snippet.String(), channel)
364365
}
365366
urlBytes, err2 := sendLogCmd.Output()
366367
if err2 != nil {

0 commit comments

Comments
 (0)