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

Support more than one path param #5

Closed
jadbox opened this issue May 24, 2016 · 3 comments
Closed

Support more than one path param #5

jadbox opened this issue May 24, 2016 · 3 comments

Comments

@jadbox
Copy link

jadbox commented May 24, 2016

The library does not support more than one path parameter being used (e.g. /:path/:path2) for a single route, otherwise it gives a gives a param error during startup.

@buaazp
Copy link
Owner

buaazp commented May 27, 2016

Maybe you set two conflicts path like these:

router.GET("/hello/:name", Hello)
router.GET("/:name/:word", MultiParams)

The path /:name is conflict with existed path /hello. Use more clear paths will fix the panic:

router.GET("/hello/:name", Hello)
router.GET("/multi/:name/:word", MultiParams)

Full codes is in examples

@buaazp buaazp closed this as completed May 31, 2016
@jadbox
Copy link
Author

jadbox commented May 31, 2016

@buaazp I only have one route, and it seems to still fail. I'll try to put together a test case.

@buaazp
Copy link
Owner

buaazp commented Jun 1, 2016

You can paste a simple badcase here to reproduct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants