gosora/router_gen/router.go
2018-11-13 14:43:05 +10:00

14 lines
293 B
Go

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...)
}