v0.0.230
This commit is contained in:
parent
655d4daad9
commit
e165f0f62f
@ -143,13 +143,24 @@ func (w *GinRouteBuilder) Handle(handler WHandlerFunc) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (w *GinWrapper) NoRoute(handler WHandlerFunc) {
|
func (w *GinWrapper) NoRoute(handler WHandlerFunc) {
|
||||||
w.engine.NoRoute(Wrap(w, handler))
|
|
||||||
|
handlers := make([]gin.HandlerFunc, 0)
|
||||||
|
|
||||||
|
if w.bufferBody {
|
||||||
|
handlers = append(handlers, BodyBuffer)
|
||||||
|
}
|
||||||
|
handlers = append(handlers, Wrap(w, handler))
|
||||||
|
|
||||||
|
middlewareNames := langext.ArrMap(handlers, func(v gin.HandlerFunc) string { return nameOfFunction(v) })
|
||||||
|
handlerName := nameOfFunction(handler)
|
||||||
|
|
||||||
|
w.engine.NoRoute(handlers...)
|
||||||
|
|
||||||
w.routeSpecs = append(w.routeSpecs, ginRouteSpec{
|
w.routeSpecs = append(w.routeSpecs, ginRouteSpec{
|
||||||
Method: "ANY",
|
Method: "ANY",
|
||||||
URL: "[NO_ROUTE]",
|
URL: "[NO_ROUTE]",
|
||||||
Middlewares: nil,
|
Middlewares: middlewareNames,
|
||||||
Handler: nameOfFunction(handler),
|
Handler: handlerName,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
package goext
|
package goext
|
||||||
|
|
||||||
const GoextVersion = "0.0.229"
|
const GoextVersion = "0.0.230"
|
||||||
|
|
||||||
const GoextVersionTimestamp = "2023-08-08T16:05:44+0200"
|
const GoextVersionTimestamp = "2023-08-08T16:09:02+0200"
|
||||||
|
Loading…
Reference in New Issue
Block a user