2018-11-13 04:43:05 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
type Router struct {
|
2022-02-21 03:32:53 +00:00
|
|
|
routeList []*RouteImpl
|
|
|
|
routeGroups []*RouteGroup
|
2018-11-13 04:43:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (r *Router) Add(route ...*RouteImpl) {
|
2022-02-21 03:32:53 +00:00
|
|
|
r.routeList = append(r.routeList, route...)
|
2018-11-13 04:43:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (r *Router) AddGroup(routeGroup ...*RouteGroup) {
|
2022-02-21 03:32:53 +00:00
|
|
|
r.routeGroups = append(r.routeGroups, routeGroup...)
|
2018-11-13 04:43:05 +00:00
|
|
|
}
|