httptreemux
httptreemux copied to clipboard
Question: will regexp routes be considered?
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.
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 https://github.com/dimfeld/httptreemux/blob/ce8677cff45072010a99d509b1694ce1fcf21707/tree.go#L267 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.
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.