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