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

Allow regex url paths ending which includes slashes #632

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jochumdev
Copy link

This PR allows paths like (it makes the second one possible):

r.Get("/v0/{path:[a-zA-Z0-9-/]+}.{format:(json|xml|html)+}", a.getTreeObject)
r.Get("/v0/{path:[a-zA-Z0-9-/]+}", a.getTreeObject)

witch matche URL's like:

urls:
  -  /v0/lists/com/github/go-chi/chi/v5
  -  /v0/lists/com/github/go-chi/chi/v5.json

While this works for me (tm) and i ran the test cases, idk it's the right way.

Kind Regards,
René

Signed-off-by: René Jochum [email protected]

@jochumdev
Copy link
Author

@pkieltyka wanna have a look?

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

Successfully merging this pull request may close these issues.

1 participant