test support go1.18 (#2990)

This commit is contained in:
thinkerou
2022-03-21 09:43:17 +08:00
committed by GitHub
parent 9701b651b7
commit 2bde107686
47 changed files with 214 additions and 174 deletions
+2 -2
View File
@@ -28,7 +28,7 @@ var (
)
// RecoveryFunc defines the function passable to CustomRecovery.
type RecoveryFunc func(c *Context, err interface{})
type RecoveryFunc func(c *Context, err any)
// Recovery returns a middleware that recovers from any panics and writes a 500 if there was one.
func Recovery() HandlerFunc {
@@ -102,7 +102,7 @@ func CustomRecoveryWithWriter(out io.Writer, handle RecoveryFunc) HandlerFunc {
}
}
func defaultHandleRecovery(c *Context, err interface{}) {
func defaultHandleRecovery(c *Context, err any) {
c.AbortWithStatus(http.StatusInternalServerError)
}