move router to httpx

This commit is contained in:
kevin
2020-07-31 12:13:30 +08:00
parent f372ded63c
commit b73684d9a6
7 changed files with 896 additions and 902 deletions

View File

@@ -6,7 +6,7 @@ import (
"zero/core/logx"
"zero/rest/handler"
"zero/rest/internal/router"
"zero/rest/httpx"
)
type (
@@ -124,7 +124,7 @@ func WithPriority() RouteOption {
}
}
func WithRouter(router router.Router) RunOption {
func WithRouter(router httpx.Router) RunOption {
return func(server *Server) {
server.opts.start = func(srv *engine) error {
return srv.StartWithRouter(router)