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
go get github.com/kubastick/ginception
This package is following Go Mod (vgo) modules system
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")
}