GO-SLACK

Documentation Go Report Card Go

A simple golang slack API

Support Multiple Webhooks

simple because it only send given message to a webhook url(s)

Example

setup

  • 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)

send the message

  • use send function
    err := sl.Send("your message here")
    if err != nil {
        //handle the error
    }
    
    //or Send Async
    sl.SendAsync("message")

TODO

  • create unit test