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

net/http/httptest: Example uses ResponseRecorder directly #16837

Closed
ceocoder opened this issue Aug 22, 2016 · 4 comments
Closed

net/http/httptest: Example uses ResponseRecorder directly #16837

ceocoder opened this issue Aug 22, 2016 · 4 comments

Comments

@ceocoder
Copy link
Contributor

httptest.ResponseRecorder is inspected directly instead of calling Result() to obtain a http.Response

[1] https://golang.org/pkg/net/http/httptest/#example_ResponseRecorder

@bradfitz
Copy link
Contributor

@ceocoder, that was the old way, and still acceptable. But yes, we should probably show the new way in the example.

@bradfitz bradfitz added this to the Go1.8 milestone Aug 22, 2016
@ceocoder
Copy link
Contributor Author

@bradfitz I've a CL ready, I'm trying to push it up. Just waiting on CLA to propagate

@ceocoder
Copy link
Contributor Author

Here we go, https://go-review.googlesource.com/27495

@gopherbot
Copy link

CL https://golang.org/cl/27495 mentions this issue.

@golang golang locked and limited conversation to collaborators Aug 23, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants