Skip to content

woopla/slack-go-webhook

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

GoDoc

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

About

Go Library to send messages to Slack via Webhooks

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%