项目作者: kubastick

项目描述 :
Exception page middleware that look's like ASP.NET core one for Golang Gin
高级语言: Go
项目地址: git://github.com/kubastick/ginception.git
创建时间: 2019-02-06T20:31:46Z
项目社区:https://github.com/kubastick/ginception

开源协议:MIT License

下载


Ginception - Catch panics like a pro

Build Status
This is exception page middleware that look’s like ASP.NET core one for Golang Gin-Gionic

Features:

  • Stack trace of panic
  • Query URL
  • All cookies and their values
  • Request headers

Installation

go get github.com/kubastick/ginception
This package is following Go Mod (vgo) modules system

Usage

  1. import (
  2. "github.com/kubastick/ginception"
  3. "github.com/gin-gonic/gin"
  4. )
  5. func main() {
  6. r := gin.Default()
  7. r.Use(ginception.Middleware()) // Attach ginception middleware
  8. r.GET("/", func(context *gin.Context) {
  9. panic("test panic")
  10. })
  11. r.Run(":7885")
  12. }