@@ -32,7 +32,7 @@ var testUser = user{1, "Jon Snow"}
32
32
33
33
func BenchmarkAllocJSONP (b * testing.B ) {
34
34
e := New ()
35
- req := httptest .NewRequest (POST , "/" , strings .NewReader (userJSON ))
35
+ req := httptest .NewRequest (http . MethodPost , "/" , strings .NewReader (userJSON ))
36
36
rec := httptest .NewRecorder ()
37
37
c := e .NewContext (req , rec ).(* context )
38
38
@@ -46,7 +46,7 @@ func BenchmarkAllocJSONP(b *testing.B) {
46
46
47
47
func BenchmarkAllocJSON (b * testing.B ) {
48
48
e := New ()
49
- req := httptest .NewRequest (POST , "/" , strings .NewReader (userJSON ))
49
+ req := httptest .NewRequest (http . MethodPost , "/" , strings .NewReader (userJSON ))
50
50
rec := httptest .NewRecorder ()
51
51
c := e .NewContext (req , rec ).(* context )
52
52
@@ -60,7 +60,7 @@ func BenchmarkAllocJSON(b *testing.B) {
60
60
61
61
func BenchmarkAllocXML (b * testing.B ) {
62
62
e := New ()
63
- req := httptest .NewRequest (POST , "/" , strings .NewReader (userJSON ))
63
+ req := httptest .NewRequest (http . MethodPost , "/" , strings .NewReader (userJSON ))
64
64
rec := httptest .NewRecorder ()
65
65
c := e .NewContext (req , rec ).(* context )
66
66
@@ -849,7 +849,7 @@ func TestContext_IsWebSocket(t *testing.T) {
849
849
850
850
func TestContext_Bind (t * testing.T ) {
851
851
e := New ()
852
- req := httptest .NewRequest (POST , "/" , strings .NewReader (userJSON ))
852
+ req := httptest .NewRequest (http . MethodPost , "/" , strings .NewReader (userJSON ))
853
853
c := e .NewContext (req , nil )
854
854
u := new (user )
855
855
0 commit comments