Skip to content
Snippets Groups Projects
Commit 45256e97 authored by 邹毅贤's avatar 邹毅贤
Browse files

fix problems

parent 2be8f85d
No related branches found
No related tags found
No related merge requests found
......@@ -65,10 +65,10 @@ func NewRouterChain(url *common.URL) (*RouterChain, error) {
return nil, perrors.Errorf("Illegal route rule!")
}
routers := make([]router.Router, 0)
for _, routerFactory := range routerFactories {
for key, routerFactory := range routerFactories {
r, err := routerFactory().Router(url)
if r == nil || err != nil {
logger.Errorf("router chain build router fail! error:%s", err.Error())
logger.Errorf("router chain build router fail! routerFactories key:%s error:%s", key, err.Error())
continue
}
routers = append(routers, r)
......
......@@ -41,10 +41,10 @@ const (
//ROUTE_PATTERN route pattern regex
ROUTE_PATTERN = `([&!=,]*)\\s*([^&!=,\\s]+)`
// FORCE ...
FORCE = "force"
ENABLED = "enabled"
FORCE = "force"
ENABLED = "enabled"
// PRIORITY ...
PRIORITY = "priority"
PRIORITY = "priority"
)
var (
......
......@@ -22,4 +22,4 @@ const (
CONF_PROVIDER_FILE_PATH = "CONF_PROVIDER_FILE_PATH"
APP_LOG_CONF_FILE = "APP_LOG_CONF_FILE"
CONF_ROUTER_FILE_PATH = "CONF_ROUTER_FILE_PATH"
)
\ No newline at end of file
)
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment