slack-go-webhook
Go Lang library to send messages to Slack via Incoming Webhooks.
Usage
package main
import "github.com/woopla/slack-go-webhook"
func main() {
attachment1 := slack.Attachment {}
attachment1.
AddField(slack.Field { Title: "Author", Value: "Clément Moyroud" }).
AddField(slack.Field { Title: "Status", Value: "Completed" })
payload := slack.Payload("Hello from <https://github.com/woopla/slack-go-webhook|slack-go-webhook>, a Go-Lang library to send slack webhook messages.",
"golang-bot",
"",
"golang-test",
[]slack.Attachment { attachment1 })
slack.Send("https://hooks.slack.com/services/foo/bar/baz", "", payload)
}