Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/int128/slack
Slack/Mattermost Incoming Webhooks API Client for Go
https://github.com/int128/slack
appengine golang incoming-webhooks mattermost slack
Last synced: 4 months ago
JSON representation
Slack/Mattermost Incoming Webhooks API Client for Go
- Host: GitHub
- URL: https://github.com/int128/slack
- Owner: int128
- License: apache-2.0
- Created: 2018-10-26T00:52:32.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-07-04T12:14:39.000Z (over 4 years ago)
- Last Synced: 2024-10-13T00:55:58.019Z (4 months ago)
- Topics: appengine, golang, incoming-webhooks, mattermost, slack
- Language: Go
- Homepage: https://godoc.org/github.com/int128/slack
- Size: 20.5 KB
- Stars: 4
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# slack [](https://godoc.org/github.com/int128/slack) [](https://circleci.com/gh/int128/slack) [](https://codecov.io/gh/int128/slack)
This is a Go package for sending messages via [Slack Incoming Webhooks API](https://api.slack.com/docs/messages) and [Mattermost Incoming Webhooks API](https://developers.mattermost.com/integrate/incoming-webhooks/).
It provides dialects for Slack and Mattermost.See [GoDoc](https://godoc.org/github.com/int128/slack).
## Examples
```go
package mainimport (
"log""github.com/int128/slack"
)const webhook = "https://hooks.slack.com/services/..."
func main() {
if err := slack.Send(webhook, &slack.Message{
Username: "mybot",
IconEmoji: ":star:",
Text: "Hello World!",
}); err != nil {
log.Fatalf("Could not send the message to Slack: %s", err)
}
}
```See also [example/main.go](example/main.go).
## Contributions
This is an open source software licensed under Apache-2.0.
Feel free to open issues and pull requests.