Skip to content

Support Hijack on Status Code Tracker #10

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

Closed

Conversation

pquerna
Copy link
Contributor

@pquerna pquerna commented May 1, 2017

This is a different approach to #7

Instead of returning an error, wrap the response in two different structs, one that has Hijack, and one that doesn't. This doesn't scale well if there are more optional interfaces to support, but Hijack is the primary one seen in the wild for ResponseWriters....

I wish it was a little cleaner, but didn't see many other ways to do it.

…erface converssions at other layers continue to work as expected
@yurishkuro
Copy link
Collaborator

We ran into a similar issue in our internal instrumentation library and decided to go with github.com/felixge/httpsnoop that allows a whole set of interfaces and using different structs for each unique combination.

@pquerna
Copy link
Contributor Author

pquerna commented May 1, 2017

oh sweet, yeah https://github.com/felixge/httpsnoop looks like a better way to do this.

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

Successfully merging this pull request may close these issues.

2 participants