From 64a7f21cd32eb0c55dda3f02e5f1f7a2efc9ad36 Mon Sep 17 00:00:00 2001 From: thooh Date: Thu, 7 Dec 2023 11:32:47 +0800 Subject: [PATCH] feat(router): not obtain middleware in RouteInfo --- gin.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gin.go b/gin.go index 5a605cf1..99a4e58d 100644 --- a/gin.go +++ b/gin.go @@ -63,6 +63,7 @@ type RouteInfo struct { Method string Path string Handler string + Handlers HandlersChain HandlerFunc HandlerFunc } @@ -360,6 +361,7 @@ func iterate(path, method string, routes RoutesInfo, root *node) RoutesInfo { Method: method, Path: path, Handler: nameOfFunction(handlerFunc), + Handlers: root.handlers, HandlerFunc: handlerFunc, }) }