Open martinbeentjes opened 7 years ago
Yes. There you define per route the exact method. Shouldn't it be 'prettier' to assign the /products
to the ProductController via a prefix? And then define all the routes? Or is this an ugly idea?
yeah most of the other mvc frameworks supports like that i guess. but i think the currently way is more flexible
One downside: controllers.go
now has an understanding of the routes of the other subcontrollers. I see the collection of routes with a prefix /products/
to be part of a products service.
To keep my project clean, I want all innercode to stay inside that service. Which means to keep all the route definitions in that specific controller folder.
good idea i just recently switch to chi
since mux
is lack of middleware. gonna push some changes to the template later then
Awesome little bootstrap for a MVC project. I was wondering, wouldn't it be a bit nicer to have subrouters per
/{page}/
? So each controller gets a prefixed router?