Skip to content

Commit 43464d7

Browse files
committed
fixed #33 Change fuc name to camel case format.
Signed-off-by: Bo-Yi Wu <[email protected]>
1 parent 1227320 commit 43464d7

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ func TestQueryString(t *testing.T) {
186186
r := gofight.New()
187187

188188
r.GET("/hello").
189-
SetQUERY(gofight.H{
189+
SetQuery(gofight.H{
190190
"a": "1",
191191
"b": "2",
192192
}).
@@ -203,7 +203,7 @@ func TestQueryString(t *testing.T) {
203203
r := gofight.New()
204204

205205
r.GET("/hello?foo=bar").
206-
SetQUERY(gofight.H{
206+
SetQuery(gofight.H{
207207
"a": "1",
208208
"b": "2",
209209
}).

gofight.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@
1414
// "X-Version": version,
1515
// })
1616
//
17-
// Set query string: Using SetQUERY to generate query string data.
17+
// Set query string: Using SetQuery to generate query string data.
1818
//
19-
// SetQUERY(gofight.H{
19+
// SetQuery(gofight.H{
2020
// "a": "1",
2121
// "b": "2",
2222
// })
2323
//
24-
// POST FORM Data: Using SetFORM to generate form data.
24+
// POST FORM Data: Using SetForm to generate form data.
2525
//
26-
// SetFORM(gofight.H{
26+
// SetForm(gofight.H{
2727
// "a": "1",
2828
// "b": "2",
2929
// })
@@ -206,8 +206,8 @@ func (rc *RequestConfig) SetJSON(body D) *RequestConfig {
206206
return rc
207207
}
208208

209-
// SetFORM supply form body.
210-
func (rc *RequestConfig) SetFORM(body H) *RequestConfig {
209+
// SetForm supply form body.
210+
func (rc *RequestConfig) SetForm(body H) *RequestConfig {
211211
f := make(url.Values)
212212

213213
for k, v := range body {
@@ -219,8 +219,8 @@ func (rc *RequestConfig) SetFORM(body H) *RequestConfig {
219219
return rc
220220
}
221221

222-
// SetQUERY supply query string.
223-
func (rc *RequestConfig) SetQUERY(query H) *RequestConfig {
222+
// SetQuery supply query string.
223+
func (rc *RequestConfig) SetQuery(query H) *RequestConfig {
224224
f := make(url.Values)
225225

226226
for k, v := range query {

gofight_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ func TestGinPostFormData(t *testing.T) {
9797
r := New()
9898

9999
r.POST("/form").
100-
SetFORM(H{
100+
SetForm(H{
101101
"a": "1",
102102
"b": "2",
103103
}).
@@ -385,15 +385,15 @@ func TestSetQueryString(t *testing.T) {
385385
r := New()
386386

387387
r.GET("/hello").
388-
SetQUERY(H{
388+
SetQuery(H{
389389
"a": "1",
390390
"b": "2",
391391
})
392392

393393
assert.Equal(t, "/hello?a=1&b=2", r.Path)
394394

395395
r.GET("/hello?foo=bar").
396-
SetQUERY(H{
396+
SetQuery(H{
397397
"a": "1",
398398
"b": "2",
399399
})

0 commit comments

Comments
 (0)