Skip to content

Exception page middleware that look's like ASP.NET core one for Golang Gin

License

Notifications You must be signed in to change notification settings

kubastick/ginception

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

import (
  "github.com/kubastick/ginception"
  "github.com/gin-gonic/gin"
)

func main() {
  r := gin.Default()
  r.Use(ginception.Middleware()) // Attach ginception middleware
  r.GET("/", func(context *gin.Context) {
    panic("test panic")
  })
  r.Run(":7885")
}

About

Exception page middleware that look's like ASP.NET core one for Golang Gin

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages