]> Cypherpunks repositories - gostls13.git/commit
net/http/httptest: show usage of httptest.NewRequest in example
authorKonstantin Shaposhnikov <k.shaposhnikov@gmail.com>
Sat, 25 Jun 2016 12:32:40 +0000 (20:32 +0800)
committerBrad Fitzpatrick <bradfitz@golang.org>
Mon, 27 Jun 2016 21:08:47 +0000 (21:08 +0000)
commitb43fe463ff93e5ab0849d9d31bf53f87b42a9b28
treeb6fa95779bbbf461adb73b9bd6196e8e4f49053a
parent3e9d6e064d554edeed9c55325832844403ae5d3f
net/http/httptest: show usage of httptest.NewRequest in example

Change ExampleResponseRecorder to use httptest.NewRequest instead of
http.NewRequest. This makes the example shorter and shows how to use
one more function from the httptest package.

Change-Id: I3d35869bd0a4daf1c7551b649428bb2f2a45eba2
Reviewed-on: https://go-review.googlesource.com/24480
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/net/http/httptest/example_test.go