bunrouter icon indicating copy to clipboard operation
bunrouter copied to clipboard

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

Open nics opened this issue 1 year ago • 0 comments

💡 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")

nics avatar Mar 30 '23 09:03 nics