resolve conflict changes in rebase
This commit is contained in:
parent
98a1c62eba
commit
fb748cb255
1 changed files with 2 additions and 20 deletions
|
@ -4,6 +4,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/lbryio/lbry.go/errors"
|
"github.com/lbryio/lbry.go/errors"
|
||||||
|
|
||||||
"github.com/nlopes/slack"
|
"github.com/nlopes/slack"
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
|
@ -18,26 +19,6 @@ func InitSlack(token string, channel string, username string) {
|
||||||
defaultChannel = channel
|
defaultChannel = channel
|
||||||
defaultUsername = username
|
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.
|
// SendToSlackUser Sends message to a specific user.
|
||||||
func SendToSlackUser(user, username, message string) error {
|
func SendToSlackUser(user, username, message string) error {
|
||||||
|
@ -67,6 +48,7 @@ func SendToSlack(message string) error {
|
||||||
|
|
||||||
func sendToSlack(channel, username, message string) error {
|
func sendToSlack(channel, username, message string) error {
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
if slackApi == nil {
|
if slackApi == nil {
|
||||||
err = errors.Err("no slack token provided")
|
err = errors.Err("no slack token provided")
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue