Skip to content

Added Write method to rest ResponseWriter interface. #197

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
wants to merge 1 commit into from
Closed

Added Write method to rest ResponseWriter interface. #197

wants to merge 1 commit into from

Conversation

ajpen
Copy link

@ajpen ajpen commented Sep 29, 2016

Resolves #192
I've added this function to satisfy the interface of http.ResponseWriter,
allowing rest.ResponseWriter to be used interchangably with
http.ResponseWriter.

I've added this function to satisfy the interface of http.ResponseWriter,
allowing rest.ResponseWriter to be used interchangably with
http.ResponseWriter.
@ant0ine
Copy link
Owner

ant0ine commented Sep 29, 2016

I believe this is against Go principles. Why not just using type assertion ?

writer.(http.ResponseWrite).Write(...)

@ajpen
Copy link
Author

ajpen commented Oct 18, 2016

I'm not too sure about it being against go principles. Go is all for satisfying interfaces. You see it a lot in the standard packages, especially the io with io.Reader and io.Writer and its flavors.

Also, I doubt type assertion will help with #192.

@ajpen
Copy link
Author

ajpen commented Nov 21, 2016

Hi @ant0ine, any update on this?

@ant0ine
Copy link
Owner

ant0ine commented Jan 5, 2017

Duplicate of this one: #189

Closing for the same reason.

@ant0ine ant0ine closed this Jan 5, 2017
@ajpen ajpen deleted the satisfy-http-responsewriter branch January 5, 2017 11:02
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