Files
tuu/tuu.go
2017-11-10 06:54:12 +00:00

23 lines
291 B
Go

package tuu
import (
"github.com/gorilla/mux"
)
func New(r Router) *App {
return &App{router: r}
}
type App struct {
router Router
}
func (a *App) Serve() {
r := mux.NewRouter()
for _, route := range a.router.GetRoutes() {
r.Handle(route.Path, route).Methods(route.Method)
}
}