Skip to content

Commit

Permalink
refactor slack function to take a message
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrie30 committed Apr 15, 2018
1 parent 998bc1e commit 1b909ef
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions alerts/slack.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ var (
channelName = os.Getenv("SLACK_CHANNEL")
)

func main() {
// Slack sends message to slack channel
func Slack(msg string) {

api := slack.New(token)
err := api.ChatPostMessage(channelName, "Hello, world!", nil)
err := api.ChatPostMessage(channelName, msg, nil)
if err != nil {
panic(err)
}
Expand Down

0 comments on commit 1b909ef

Please sign in to comment.