Are sub-routers or router-groups possible?
Closed this issue · 3 comments
francoishill commented
Like for instance the following:
subRouter := bone.New()
subRouter.GetFunc("/getNames", GetUserNamesControllerFunc)
subRouter.GetFunc("/getEmail", GetUserEmailControllerFunc)
router.Handle("/user", subRouter)
I would like this code to handle the /user/getNames
and /user/getEmail
urls but it does not work. Is this functionality supported?
squiidz commented
No :/ But i will take a look at this, for instance you can do that:
subRouter.GetFunc("/user/getNames", GetUserNamesControllerFunc)
subRouter.GetFunc("/user/getEmail", GetUserEmailControllerFunc)
I know it's not exactly what you want, but until i found a way to implement your feature, it could be a simple workaround ...
And thanks for your contribution ! :)
squiidz commented
It should work now, just check example 003
or in the changelog at the end of the README !
If you encounter any problemes let me know ! :)
francoishill commented
Thank you for you very quick response, wow! Will try as soon as I can.