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

Can you make public accessor to pathPrefix of a Router? #88

Open
krestianskov opened this issue Jan 31, 2019 · 0 comments
Open

Can you make public accessor to pathPrefix of a Router? #88

krestianskov opened this issue Jan 31, 2019 · 0 comments

Comments

@krestianskov
Copy link

krestianskov commented Jan 31, 2019

In some scenarios, it's handy to get the full path of an endpoint like this:
curPath := "/path/to/resource"
subRouter.Get(curPath, fn)
fullPath := subRouter.PathPrefix() + curPath

Without public accessor, I have to pass sub-routers prefixes everywhere.

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