github.com/Azareal/Gosora@v0.0.0-20210729070923-553e66b59003/router_gen/router.go (about)

     1  package main
     2  
     3  type Router struct {
     4  	routeList   []*RouteImpl
     5  	routeGroups []*RouteGroup
     6  }
     7  
     8  func (r *Router) Add(route ...*RouteImpl) {
     9  	r.routeList = append(r.routeList, route...)
    10  }
    11  
    12  func (r *Router) AddGroup(routeGroup ...*RouteGroup) {
    13  	r.routeGroups = append(r.routeGroups, routeGroup...)
    14  }