树状结构优化

This commit is contained in:
hoteas 2022-08-25 13:06:26 +08:00
parent 72c23499f2
commit 2ee0838d8a

View File

@ -374,15 +374,17 @@ func (that *Application) handler(w http.ResponseWriter, req *http.Request) {
}()
//访问拦截true继续false暂停
connectListenerLen := len(that.connectListener)
for i := 0; i < connectListenerLen; i++ {
if that.connectListener[i](&context) {
connectListenerLen := len(that.connectListener) - 1
for true {
if connectListenerLen < 0 {
break
}
if that.connectListener[connectListenerLen](&context) {
context.View()
return
}
connectListenerLen--
}
//接口服务