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

Multiple Middleware Calls Are Unnecessary #184

Closed
marwan-at-work opened this issue Feb 8, 2019 · 0 comments
Closed

Multiple Middleware Calls Are Unnecessary #184

marwan-at-work opened this issue Feb 8, 2019 · 0 comments

Comments

@marwan-at-work
Copy link
Contributor

Is there a reason why gizmo calls Middleware on every single request here? https://github.com/NYTimes/gizmo/blob/master/server/simple_server.go#L114

Why shouldn't the Middleware method be called once during server.Register so that external handlers only have to be instantiated once such as https://godoc.org/go.opencensus.io/plugin/ochttp#example-Handler--Mux

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