gin/binding
guonaihong 5b9692dc3b binding: support []byte
* form1.go
```golang
package main

import (
	"fmt"
	"github.com/gin-gonic/gin"
)

type testForm struct {
	Mode   string `form:"mode"`
	Text   string `form:"text"`
	Voice  []byte `form:"voice"`
	Voice2 []byte `form:"voice2"`
}

func main() {
	router := gin.Default()
	router.POST("/test.form", func(c *gin.Context) {

		t2 := testForm{}
		if err := c.ShouldBind(&t2); err != nil {
			fmt.Printf("err = %s:%v\n", err, t2)
			c.JSON(500, gin.H{"err": err.Error()})
			return
		}
		c.JSON(200, t2)
	})

	router.Run()
}

//client
/*
curl -F mode=A -F text="test" -F voice=@form1.go -F voice2="voice" 127.0.0.1:8080/test.form|jq
{
  "Mode": "A",
  "Text": "test",
  "Voice": "cGFja2FnZSBtYWluCgppbXBvcnQgKAoJImZtdCIKCSJnaXRodWIuY29tL2dpbi1nb25pYy9naW4iCikKCnR5cGUgdGVzdEZvcm0gc3RydWN0IHsKCU1vZGUgICBzdHJpbmcgYGZvcm06Im1vZGUiYAoJVGV4dCAgIHN0cmluZyBgZm9ybToidGV4dCJgCglWb2ljZSAgW11ieXRlIGBmb3JtOiJ2b2ljZSJgCglWb2ljZTIgW11ieXRlIGBmb3JtOiJ2b2ljZTIiYAp9CgpmdW5jIG1haW4oKSB7Cglyb3V0ZXIgOj0gZ2luLkRlZmF1bHQoKQoJcm91dGVyLlBPU1QoIi90ZXN0LmZvcm0iLCBmdW5jKGMgKmdpbi5Db250ZXh0KSB7CgoJCXQyIDo9IHRlc3RGb3Jte30KCQlpZiBlcnIgOj0gYy5TaG91bGRCaW5kKCZ0Mik7IGVyciAhPSBuaWwgewoJCQlmbXQuUHJpbnRmKCJlcnIgPSAlczoldlxuIiwgZXJyLCB0MikKCQkJYy5KU09OKDUwMCwgZ2luLkh7ImVyciI6IGVyci5FcnJvcigpfSkKCQkJcmV0dXJuCgkJfQoJCWMuSlNPTigyMDAsIHQyKQoJfSkKCglyb3V0ZXIuUnVuKCkKfQo=",
  "Voice2": "dm9pY2U="
}
*/

```
2019-08-13 21:49:41 +08:00
..
binding.go support bind http header param #1956 (#1957) 2019-06-27 12:47:45 +08:00
binding_body_test.go Yaml binding (#1618) 2018-11-06 09:49:45 +08:00
binding_test.go binding: support unix time (#1980) 2019-07-10 13:02:40 +08:00
default_validator.go update error(err) to err (#1416) 2018-07-01 21:10:48 +08:00
form.go binding: add support of multipart multi files (#1878) (#1949) 2019-06-18 19:49:10 +08:00
form_mapping.go binding: support []byte 2019-08-13 21:49:41 +08:00
form_mapping_benchmark_test.go refactor(form_mapping.go): mapping ptr, struct and map (#1749) 2019-03-03 14:39:43 +08:00
form_mapping_test.go binding: move tests of mapping to separate test file (#1842) 2019-05-07 19:06:55 +08:00
header.go support bind http header param #1956 (#1957) 2019-06-27 12:47:45 +08:00
json.go handle nil body for JSON binding (#1638) 2018-11-22 09:55:51 +08:00
msgpack.go Fix #216: Enable to call binding multiple times in some formats (#1341) 2018-05-11 10:33:33 +08:00
multipart_form_mapping.go binding: support []byte 2019-08-13 21:49:41 +08:00
multipart_form_mapping_test.go binding: add support of multipart multi files (#1878) (#1949) 2019-06-18 19:49:10 +08:00
protobuf.go Fix typos (#1626) 2018-11-05 14:17:04 +08:00
query.go style(import): not use aliase when import package (#1146) 2017-10-29 13:12:22 +01:00
uri.go support bind uri param (#1612) 2018-11-22 09:29:48 +08:00
validate_test.go unify assert.Equal usage (#1327) 2018-04-20 10:27:44 +08:00
xml.go Fix #216: Enable to call binding multiple times in some formats (#1341) 2018-05-11 10:33:33 +08:00
yaml.go Yaml binding (#1618) 2018-11-06 09:49:45 +08:00