接口层复用
This commit is contained in:
parent
c8a9038efe
commit
98619083a1
@ -73,10 +73,18 @@ func (that *Application) Run(router Router) {
|
||||
if that.Router[k] == nil {
|
||||
that.Router[k] = v
|
||||
}
|
||||
|
||||
//直达接口层复用
|
||||
for k1, v1 := range v {
|
||||
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{}
|
||||
|
Loading…
Reference in New Issue
Block a user