format the code

This commit is contained in:
byene0923 2021-04-19 00:03:30 +08:00
parent 89c2b85471
commit c349775c49
2 changed files with 2 additions and 4 deletions

View File

@ -287,7 +287,6 @@ func (c *Controller) BindXML(obj interface{}) error {
return xml.Unmarshal(c.Ctx.Input.RequestBody, obj) return xml.Unmarshal(c.Ctx.Input.RequestBody, obj)
} }
// Mapping the method to function // Mapping the method to function
func (c *Controller) Mapping(method string, fn func()) { func (c *Controller) Mapping(method string, fn func()) {
c.methodMapping[method] = fn c.methodMapping[method] = fn

View File

@ -198,7 +198,7 @@ func TestBindJson(t *testing.T) {
assert.Equal(t, "FOO", s.Foo) assert.Equal(t, "FOO", s.Foo)
} }
func TestBindNoContentType(t *testing.T) { func TestBindNoContentType(t *testing.T) {
var s struct { var s struct {
Foo string `json:"foo"` Foo string `json:"foo"`
} }
@ -212,7 +212,6 @@ func TestBindNoContentType(t *testing.T) {
assert.Equal(t, "FOO", s.Foo) assert.Equal(t, "FOO", s.Foo)
} }
func TestBindXML(t *testing.T) { func TestBindXML(t *testing.T) {
var s struct { var s struct {
@ -244,4 +243,4 @@ func TestBindYAML(t *testing.T) {
err := ctrlr.Bind(&s) err := ctrlr.Bind(&s)
require.NoError(t, err) require.NoError(t, err)
assert.Equal(t, "FOO", s.Foo) assert.Equal(t, "FOO", s.Foo)
} }