Skip to content

easonlin404/gin-slack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gin-slack

Gin framework middleware for reporting panic to Slack.

Travis branch Codecov branch Go Report Card GoDoc Slack Image

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()
}

About

Reporting panic to Slack for Gin middleware

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages