@@ -209,7 +209,7 @@ func (d *winbot) Run(bot *slackbot.Bot, channel string, args []string) (string,
209209 logf .Close ()
210210 return string (stdoutStderr ), err
211211 }
212- commit := strings .TrimSpace (string (stdoutStderr [:] ))
212+ commit := strings .TrimSpace (string (stdoutStderr ))
213213 if commit != "HEAD" {
214214 gitCmd = exec .Command (
215215 "git.exe" ,
@@ -294,7 +294,7 @@ func (d *winbot) Run(bot *slackbot.Bot, channel string, args []string) (string,
294294 scanner := bufio .NewScanner (f )
295295 for scanner .Scan () {
296296 lines [lineCount % numLogLines ] = scanner .Text ()
297- lineCount += 1
297+ lineCount ++
298298 }
299299 if err := scanner .Err (); err != nil {
300300 bot .SendMessage (autoBuild + "Error scanning " + logFileName + ": " + err .Error (), channel )
@@ -315,7 +315,7 @@ func (d *winbot) Run(bot *slackbot.Bot, channel string, args []string) (string,
315315 msg := fmt .Sprintf ("%s, log upload error %s" , resultMsg , err2 .Error ())
316316 bot .SendMessage (msg , channel )
317317 } else {
318- msg := fmt .Sprintf ("%s, view log at %s" , resultMsg , string (urlBytes [:] ))
318+ msg := fmt .Sprintf ("%s, view log at %s" , resultMsg , string (urlBytes ))
319319 bot .SendMessage (msg , channel )
320320 }
321321 }()
@@ -374,7 +374,7 @@ func (d *winbot) Run(bot *slackbot.Bot, channel string, args []string) (string,
374374 bot .SendMessage (string (stdoutStderr ), channel )
375375
376376 case restartCmd .FullCommand ():
377- os .Exit (0 )
377+ os .Exit (0 ) //nolint
378378 }
379379 return cmd , nil
380380}
0 commit comments