https://github.com/kubastick/ginception
Exception page middleware that look's like ASP.NET core one for Golang Gin
https://github.com/kubastick/ginception
gin-middleware golang
Last synced: 5 months ago
JSON representation
Exception page middleware that look's like ASP.NET core one for Golang Gin
- Host: GitHub
- URL: https://github.com/kubastick/ginception
- Owner: kubastick
- License: mit
- Created: 2019-02-06T20:31:46.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-02-06T21:16:07.000Z (over 7 years ago)
- Last Synced: 2024-11-12T09:17:01.744Z (over 1 year ago)
- Topics: gin-middleware, golang
- Language: Go
- Size: 93.8 KB
- Stars: 9
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Ginception - Catch panics like a pro
[](https://travis-ci.org/kubastick/ginception)
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")
}
```