Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
DefaultErrorWriter io.Writer = os.Stderr
)
View Source
var Middlewares = defaultMiddlewares()
Functions ¶
func CustomRecoveryWithWriter ¶
func CustomRecoveryWithWriter(out io.Writer, handle RecoveryFunc) gin.HandlerFunc
nolint: gocognit CustomRecoveryWithWriter returns a middleware for a given writer that recovers from any panics and calls the provided handle func to handle it.
func Recovery ¶
func Recovery() gin.HandlerFunc
Recovery returns a middleware that recovers from any panics and writes a 500 if there was one.
func RecoveryWithWriter ¶
func RecoveryWithWriter(out io.Writer) gin.HandlerFunc
RecoveryWithWriter returns a middleware for a given writer that recovers from any panics and writes a 500 if there was one.
Types ¶
type RecoveryFunc ¶
RecoveryFunc defines the function passable to CustomRecovery.
Click to show internal directories.
Click to hide internal directories.