Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/easonlin404/gin-slack
Reporting panic to Slack for Gin middleware
https://github.com/easonlin404/gin-slack
gin go golang slack slack-webhook
Last synced: 4 months ago
JSON representation
Reporting panic to Slack for Gin middleware
- Host: GitHub
- URL: https://github.com/easonlin404/gin-slack
- Owner: easonlin404
- License: mit
- Created: 2017-05-30T13:06:34.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-03-07T13:01:05.000Z (almost 5 years ago)
- Last Synced: 2024-10-02T09:20:21.924Z (5 months ago)
- Topics: gin, go, golang, slack, slack-webhook
- Language: Go
- Homepage:
- Size: 134 KB
- Stars: 7
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: license
Awesome Lists containing this project
README
# gin-slack
Gin framework middleware for reporting panic to Slack.
[](https://travis-ci.org/easonlin404/gin-slack)
[](https://codecov.io/gh/easonlin404/gin-slack)
[](https://goreportcard.com/report/github.com/easonlin404/gin-slack)
[](https://godoc.org/github.com/easonlin404/gin-slack)
## Features
* todo## Installation
```sh
$ go get -u github.com/easonlin404/gin-slack/
```
## Usage
```go
package mainimport (
"github.com/easonlin404/gin-slack"
"github.com/easonlin404/go-slack"
"github.com/gin-gonic/gin"
)func main() {
r := gin.New()// You need get your slack WebhookURL from https://api.slack.com/incoming-webhooks
s := slack.New().WebhookURL("https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX")// Use ginslack middleware
r.Use(ginslack.Recovery(s))// Other your handler
// r.Get("get",....)
r.Run()
}```