Package list golang-github-nlopes-slack / faac376
Fix nil pointer dereference in websocket.go example Pavel Dotsulenko 5 years ago
1 changed file(s) with 4 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
11
22 import (
33 "fmt"
4 "log"
5 "os"
46
57 "github.com/nlopes/slack"
68 )
79
810 func main() {
911 api := slack.New("YOUR TOKEN HERE")
12 logger := log.New(os.Stdout, "slack-bot: ", log.Lshortfile|log.LstdFlags)
13 slack.SetLogger(logger)
1014 api.SetDebug(true)
1115
1216 rtm := api.NewRTM()