-
Notifications
You must be signed in to change notification settings - Fork 8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"wildcard route conflicts with existing children" #1681
Comments
#1301 , so it's not allowed |
Wow, that is terrible. |
expected, thanks! you should re-write your route. |
Saying it's "expected" makes it double terrible, because it means you will never get around to fix it. There is no way Gin should confuse Bleble with Blibli: Bleble has two slashes, and Blibli has three! In the end I had to write my own router like this: router.GET("/", ViewHome)
router.GET("/:first", ViewRouterOne)
router.GET("/:first/:second", ViewRouterTwo)
router.GET("/:first/:second/:third", ViewRouterThree)
router.GET("/:first/:second/:third/:fourth", ViewRouterFour) Then from those functions you can redirect requests to the correct view functions. I hope this is useful to someone. |
how this routes cause conflict
|
Am I the only one who doesn't understand why something so basic is not implemented in gin? |
me either,such basic functional route supported by most http server in the world but not in gin |
How can i fix this? Where should i start to contribute to fix this? |
It's httprouter's problem that gin currently based on |
Note: gin router has some very serious limitations which mean that it does not work with some typical rest route patterns. See e.g. gin-gonic/gin#1681
is this limitation still persist now? |
Wow! Gin routing pattern matching is a mess. Now I have to refactor my app to use another framework. |
Member bump to v1.7.0 version. See https://github.com/gin-gonic/gin/releases/tag/v1.7.0 Fix!! |
@shivamganwani Thank you for classifying. |
panic: wildcard route ':different' conflicts with existing children in path '/:something/:different/:again'
Am I doing something wrong or is this simply not allowed?
The text was updated successfully, but these errors were encountered: