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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Are there plans to add named routes (aka reversing routes)? #88

Open
nics opened this issue Mar 30, 2023 · 0 comments
Open

Are there plans to add named routes (aka reversing routes)? #88

nics opened this issue Mar 30, 2023 · 0 comments

Comments

@nics
Copy link

nics commented Mar 30, 2023

馃挕 The feature or bug you are proposing

gorilla/mux supports named routes and these are very handy for url building, reporting, etc. Are there any plans to introduce these in bunrouter?

馃殌 The expected result

How this could look like:

r.Name("user").GET("/users/:id", createUserHandler)

// returns a url.URL (or simply a string)
u := r.URLTo("user", "id", "1234")
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

1 participant