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

Expose root route group for global Middleware and Afterware #56

Open
danielledeleo opened this issue Aug 12, 2021 · 0 comments
Open

Expose root route group for global Middleware and Afterware #56

danielledeleo opened this issue Aug 12, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@danielledeleo
Copy link
Contributor

Currently, you need to create an empty vk.Group to have something to attach global {after, middle}ware to.

g := vk.Group("").After(...)
g.GET("/", indexHandler)

server.AddGroup(g)

It would be nice to be able to do this instead:

server.GET("/", indexHandler)
server.After(...)
@danielledeleo danielledeleo added the enhancement New feature or request label Aug 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant