Skip to content
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

Static routing collision. #91

Closed
husio opened this issue Jul 17, 2015 · 1 comment · Fixed by gin-gonic/gin#2663
Closed

Static routing collision. #91

husio opened this issue Jul 17, 2015 · 1 comment · Fixed by gin-gonic/gin#2663

Comments

@husio
Copy link

husio commented Jul 17, 2015

Hi,

I have two endpoints - one of them return entity for given group in specified version, while the other returns the latest entity for given group. Routing should look like this:

router.GET("/:group_id/latest", redirectToLatest)
router.GET("/:group_id/:version_id", entityDetails)

Right now it's no possible. Definition order does not matter.

panic: path segment 'latest' conflicts with existing wildcard ':version_id' in path '/:group_id/latest' [recovered]   panic: path segment 'latest' conflicts with existing wildcard ':version_id' in path '/:group_id/latest'

I could check in entityDetails if version_id is latest and that's what I do right now, but it would be way nicer to allow to define static route, even if dynamic one already cover the same case.

@julienschmidt
Copy link
Owner

Duplicate of #73

similark pushed a commit to similarweb/httprouter that referenced this issue May 9, 2023
…t#91)

Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) from 0.8.1 to 0.8.3.
- [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases)
- [Commits](kubernetes-sigs/controller-runtime@v0.8.1...v0.8.3)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants