From 98619083a1d30a45a6f537cd44ccf0cbd02dd22f Mon Sep 17 00:00:00 2001 From: hoteas Date: Thu, 9 Jun 2022 03:54:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=B1=82=E5=A4=8D=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/application.go b/application.go index 6ded1cf..378bb82 100644 --- a/application.go +++ b/application.go @@ -73,10 +73,18 @@ func (that *Application) Run(router Router) { if that.Router[k] == nil { that.Router[k] = v } - + //直达接口层复用 for k1, v1 := range v { - that.Router[k][k1] = v1 + if that.Router[k][k1] == nil { + that.Router[k][k1] = v1 + } + + for k2, v2 := range v1 { + + that.Router[k][k1][k2] = v2 + } } + } //重新设置MethodRouter//直达路由 that.MethodRouter = MethodRouter{}