Support Multiple Webhooks
simple because it only send given message to a webhook url(s)
-
import the package
import "github.com/faruqisan/go-slack"
-
setup option
opt := slack.Option{ WebHookURLs: ["PUT_YOUR_WEBHOOK_URL_HERE"], }
-
create the object with option
sl := slack.New(opt)
- use send function
err := sl.Send("your message here") if err != nil { //handle the error } //or Send Async sl.SendAsync("message")
- create unit test