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:
|
case JapeMiddlewareFunc:
|
||||||
mid := middlewares[i].(JapeMiddlewareFunc)
|
mid := middlewares[i].(JapeMiddlewareFunc)
|
||||||
handler = mid(handler)
|
handler = mid(handler)
|
||||||
case HttpMiddlewareFunc:
|
case func(http.Handler) http.Handler:
|
||||||
mid := middlewares[i].(HttpMiddlewareFunc)
|
mid := middlewares[i].(func(http.Handler) http.Handler)
|
||||||
handler = AdaptMiddleware(mid)(handler)
|
handler = AdaptMiddleware(mid)(handler)
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue