Gin framework middleware for reporting panic to Slack.
- todo
$ go get -u github.com/easonlin404/gin-slack/
package main
import (
"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()
}