From 0c378a45d32ab1b5ec024e36b339d6e8f4d9d870 Mon Sep 17 00:00:00 2001 From: thooh Date: Thu, 7 Dec 2023 11:22:45 +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 f9324299..102f8696 100644 --- a/gin.go +++ b/gin.go @@ -59,6 +59,7 @@ type RouteInfo struct { Method string Path string Handler string + Handlers HandlersChain HandlerFunc HandlerFunc } @@ -357,6 +358,7 @@ func iterate(path, method string, routes RoutesInfo, root *node) RoutesInfo { Method: method, Path: path, Handler: nameOfFunction(handlerFunc), + Handlers: root.handlers, HandlerFunc: handlerFunc, }) }