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

interceptors #67

Closed
pete911 opened this issue May 23, 2017 · 3 comments
Closed

interceptors #67

pete911 opened this issue May 23, 2017 · 3 comments

Comments

@pete911
Copy link
Contributor

pete911 commented May 23, 2017

would you be interested in adding interceptors? We already have the code that extends current router, so can create pull request. The idea is to add vargs interceptor to existing methods:

router.Get("/path", someHandler, interceptor1, interceptor2)
// method signature
router.Get(path string, handler http.HandlerFunc, interceptors... Intercetpr)
router.Post(...)
...

interceptors are varagrs, so it wouldn't break existing code

@pete911
Copy link
Contributor Author

pete911 commented May 23, 2017

I thought that it would be just easier to create pull request to illustrate this - #68

@husobee
Copy link
Owner

husobee commented May 23, 2017

Good idea @pete911, looking at it.

@pete911
Copy link
Contributor Author

pete911 commented May 23, 2017

nice, let me know, I will add tests, update comments etc. if you are happy with the change

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

2 participants