From a3a6df0500bf6478f25d168c450d1267adf8c25d Mon Sep 17 00:00:00 2001 From: Jason Parrott Date: Thu, 14 Feb 2019 09:28:28 -0500 Subject: [PATCH] Support latest slack library The latest github.com/nlopes/slack library removed SetLogger and SetDebug in favor of this new options syntax. These were the changes I needed to make it work. --- main.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/main.go b/main.go index c4cb2cf..897c5c1 100644 --- a/main.go +++ b/main.go @@ -41,11 +41,13 @@ func main() { } func runSlackClient(slackApiToken string, stackSite string, tagToChannelName map[string]string, debug bool) { - api := slack.New(slackApiToken) logger := log.New(os.Stdout, "slack-bot: ", log.Lshortfile|log.LstdFlags) - - slack.SetLogger(logger) - api.SetDebug(debug) + + api := slack.New( + slackApiToken, + slack.OptionLog(logger), + slack.OptionDebug(debug), + ) rtm := api.NewRTM() go rtm.ManageConnection()