From fb748cb25549b7dca5f033741ce4357b425ada5d Mon Sep 17 00:00:00 2001 From: Niko Storni Date: Mon, 11 Jun 2018 18:14:15 -0400 Subject: [PATCH] resolve conflict changes in rebase --- util/slack.go | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/util/slack.go b/util/slack.go index 497d628..c43af80 100644 --- a/util/slack.go +++ b/util/slack.go @@ -4,6 +4,7 @@ import ( "strings" "github.com/lbryio/lbry.go/errors" + "github.com/nlopes/slack" log "github.com/sirupsen/logrus" ) @@ -18,26 +19,6 @@ func InitSlack(token string, channel string, username string) { defaultChannel = channel defaultUsername = username } -func SendToSlackInfo(format string, a ...interface{}) { - message := format - if len(a) > 0 { - message = fmt.Sprintf(format, a...) - } - if slackApi != nil { - sendToSlack(":information_source: " + message) - } - log.Debugln(message) -} -func SendToSlackError(format string, a ...interface{}) { - message := format - if len(a) > 0 { - message = fmt.Sprintf(format, a...) - } - if slackApi != nil { - sendToSlack(":sos: " + message) - } - log.Errorln(message) -} // SendToSlackUser Sends message to a specific user. func SendToSlackUser(user, username, message string) error { @@ -67,6 +48,7 @@ func SendToSlack(message string) error { func sendToSlack(channel, username, message string) error { var err error + if slackApi == nil { err = errors.Err("no slack token provided") } else {