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

Question: will regexp routes be considered? #85

Open
jxskiss opened this issue Oct 23, 2021 · 2 comments
Open

Question: will regexp routes be considered? #85

jxskiss opened this issue Oct 23, 2021 · 2 comments

Comments

@jxskiss
Copy link

jxskiss commented Oct 23, 2021

Just a question, does regexp routes will be supported? Or if it's welcomed to accept PR to support regexp?
Sometimes it's quite useful doing some migration work.

@dimfeld
Copy link
Owner

dimfeld commented Oct 27, 2021

Yeah, I can accept a PR for it if it can be done without disrupting the rest of the code too much.

Something interacting with wildcardChild, or maybe a new similar field for regexes, and doing a check around

if n.wildcardChild != nil {
should work I think.

Also I believe the Chi router (https://github.com/go-chi/chi) already accepts regexp routes so that might be a better choice than this one.

@jxskiss
Copy link
Author

jxskiss commented Oct 29, 2021

I will take a try to do some experimental work, if it looks not bad, I will send it for review and further discussing.
Yes, I guess a new similar field like wildcardChild is a good start.

Also I believe the Chi router (https://github.com/go-chi/chi) already accepts regexp routes so that might be a better choice than this one.

I'm not familiar with it, I use Gin a lot and like the router, but miss regex route ability sometimes, but Gin and httprouter seems won't accept regex.

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