gosora/router_gen/router.go

14 lines
293 B
Go
Raw Normal View History

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