Package list golang-github-nlopes-slack / 65ac61b
Fix some golint complaints Norberto Lopes 6 years ago
2 changed file(s) with 3 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
2323 case *slack.ConnectedEvent:
2424 fmt.Println("Infos:", ev.Info)
2525 fmt.Println("Connection counter:", ev.ConnectionCount)
26 // Replace #general with your Channel ID
2627 rtm.SendMessage(rtm.NewOutgoingMessage("Hello world", "#general"))
2728
2829 case *slack.MessageEvent:
3434 var err error
3535 var info *Info
3636
37 connectionCount += 1
37 connectionCount++
3838
3939 attempts := 1
4040 boff.Reset()
5252 dur := boff.Duration()
5353 rtm.Debugf("reconnection %d failed: %s", attempts, err)
5454 rtm.Debugln(" -> reconnecting in", dur)
55 attempts += 1
55 attempts++
5656 time.Sleep(dur)
5757 }
5858