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: 22 days 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 (over 4 years ago)
- Last Synced: 2024-10-02T09:20:21.924Z (about 1 month 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.
[![Travis branch](https://img.shields.io/travis/easonlin404/gin-slack/master.svg)](https://travis-ci.org/easonlin404/gin-slack)
[![Codecov branch](https://img.shields.io/codecov/c/github/easonlin404/gin-slack/master.svg)](https://codecov.io/gh/easonlin404/gin-slack)
[![Go Report Card](https://goreportcard.com/badge/github.com/easonlin404/gin-slack)](https://goreportcard.com/report/github.com/easonlin404/gin-slack)
[![GoDoc](https://godoc.org/github.com/easonlin404/gin-slack?status.svg)](https://godoc.org/github.com/easonlin404/gin-slack)
![Slack Image](https://easonlin404.github.io/gin-slack/images/slack.png)## 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()
}```