Skip to content

Commit

Permalink
fixed #33 Change fuc name to camel case format.
Browse files Browse the repository at this point in the history
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
  • Loading branch information
appleboy committed Jul 30, 2016
1 parent 1227320 commit 43464d7
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ func TestQueryString(t *testing.T) {
r := gofight.New()

r.GET("/hello").
SetQUERY(gofight.H{
SetQuery(gofight.H{
"a": "1",
"b": "2",
}).
Expand All @@ -203,7 +203,7 @@ func TestQueryString(t *testing.T) {
r := gofight.New()

r.GET("/hello?foo=bar").
SetQUERY(gofight.H{
SetQuery(gofight.H{
"a": "1",
"b": "2",
}).
Expand Down
16 changes: 8 additions & 8 deletions gofight.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@
// "X-Version": version,
// })
//
// Set query string: Using SetQUERY to generate query string data.
// Set query string: Using SetQuery to generate query string data.
//
// SetQUERY(gofight.H{
// SetQuery(gofight.H{
// "a": "1",
// "b": "2",
// })
//
// POST FORM Data: Using SetFORM to generate form data.
// POST FORM Data: Using SetForm to generate form data.
//
// SetFORM(gofight.H{
// SetForm(gofight.H{
// "a": "1",
// "b": "2",
// })
Expand Down Expand Up @@ -206,8 +206,8 @@ func (rc *RequestConfig) SetJSON(body D) *RequestConfig {
return rc
}

// SetFORM supply form body.
func (rc *RequestConfig) SetFORM(body H) *RequestConfig {
// SetForm supply form body.
func (rc *RequestConfig) SetForm(body H) *RequestConfig {
f := make(url.Values)

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

// SetQUERY supply query string.
func (rc *RequestConfig) SetQUERY(query H) *RequestConfig {
// SetQuery supply query string.
func (rc *RequestConfig) SetQuery(query H) *RequestConfig {
f := make(url.Values)

for k, v := range query {
Expand Down
6 changes: 3 additions & 3 deletions gofight_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func TestGinPostFormData(t *testing.T) {
r := New()

r.POST("/form").
SetFORM(H{
SetForm(H{
"a": "1",
"b": "2",
}).
Expand Down Expand Up @@ -385,15 +385,15 @@ func TestSetQueryString(t *testing.T) {
r := New()

r.GET("/hello").
SetQUERY(H{
SetQuery(H{
"a": "1",
"b": "2",
})

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

r.GET("/hello?foo=bar").
SetQUERY(H{
SetQuery(H{
"a": "1",
"b": "2",
})
Expand Down

0 comments on commit 43464d7

Please sign in to comment.