fix: can't use JapeMiddlewareFunc in type switch to cast
This commit is contained in:
parent
2020a9f1d1
commit
35cd041978
|
@ -37,8 +37,8 @@ func ApplyMiddlewares(handler jape.Handler, middlewares ...interface{}) jape.Han
|
|||
case JapeMiddlewareFunc:
|
||||
mid := middlewares[i].(JapeMiddlewareFunc)
|
||||
handler = mid(handler)
|
||||
case HttpMiddlewareFunc:
|
||||
mid := middlewares[i].(HttpMiddlewareFunc)
|
||||
case func(http.Handler) http.Handler:
|
||||
mid := middlewares[i].(func(http.Handler) http.Handler)
|
||||
handler = AdaptMiddleware(mid)(handler)
|
||||
|
||||
default:
|
||||
|
|
Loading…
Reference in New Issue