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

feature: Router.Name() should create a NewRoute. #456

Closed
seriousben opened this issue Feb 27, 2019 · 1 comment
Closed

feature: Router.Name() should create a NewRoute. #456

seriousben opened this issue Feb 27, 2019 · 1 comment

Comments

@seriousben
Copy link
Contributor

Describe your problem

Most of the route's functions are exposed on the router for creating a new router. Unfortunately Name is not exposed as such.

For consistency, I believe it should be exposed.

Paste a minimal, runnable, reproduction of your issue below

r := mux.NewRouter()
// works
r.Handler("/path", httpHandler).Name("route name").Method("GET")
// works
r.Method("GET").Handler("/path2", httpHandler).Name("route2 name")
// is not supported
r.Name("route name").Method("GET").Handler("/path2", httpHandler)
@seriousben
Copy link
Contributor Author

Working on a PR right now.

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