gin/binding
Andy Pan 982daeb1ec Use zero-copy approach to convert types between string and byte… (#2206)
* Use zero-copy approach to convert types between string and byte slice

* Rename argument to a eligible one

Benchmark:

BenchmarkBytesConvBytesToStrRaw-4   	21003800	        70.9 ns/op	      96 B/op	       1 allocs/op
BenchmarkBytesConvBytesToStr-4      	1000000000	         0.333 ns/op	       0 B/op	       0 allocs/op
BenchmarkBytesConvStrToBytesRaw-4   	18478059	        59.3 ns/op	      96 B/op	       1 allocs/op
BenchmarkBytesConvStrToBytes-4      	1000000000	         0.373 ns/op	       0 B/op	       0 allocs/op


Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2020-01-18 00:32:50 +08:00
..
binding.go Add build tag nomsgpack (#1852) 2020-01-07 11:31:10 +08:00
binding_msgpack_test.go Add build tag nomsgpack (#1852) 2020-01-07 11:31:10 +08:00
binding_nomsgpack.go Add build tag nomsgpack (#1852) 2020-01-07 11:31:10 +08:00
binding_test.go Add build tag nomsgpack (#1852) 2020-01-07 11:31:10 +08:00
default_validator.go upgrade go-validator to v10 (#2149) 2019-11-25 14:49:45 +08:00
form.go Refactor redirect request in gin.go (#1970) 2019-11-26 08:19:30 +08:00
form_mapping.go Use zero-copy approach to convert types between string and byte… (#2206) 2020-01-18 00:32:50 +08:00
form_mapping_benchmark_test.go Fix 'errcheck' linter warnings (#2093) 2019-10-27 13:58:59 +08:00
form_mapping_test.go fix ignore walking on form mapping (#1942) (#1943) 2019-11-01 10:47:40 +08:00
header.go support bind http header param #1956 (#1957) 2019-06-27 12:47:45 +08:00
json.go feat(binding): add DisallowUnknownFields() in gin.Context.BindJSON() (#2028) 2019-09-06 13:56:59 +08:00
json_test.go Relocate binding body tests (#2086) 2019-10-10 16:58:31 +08:00
msgpack.go Add build tag nomsgpack (#1852) 2020-01-07 11:31:10 +08:00
msgpack_test.go Add build tag nomsgpack (#1852) 2020-01-07 11:31:10 +08:00
multipart_form_mapping.go binding: add support of multipart multi files (#1878) (#1949) 2019-06-18 19:49:10 +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 upgrade go-validator to v10 (#2149) 2019-11-25 14:49:45 +08:00
xml.go Fix #216: Enable to call binding multiple times in some formats (#1341) 2018-05-11 10:33:33 +08:00
xml_test.go Relocate binding body tests (#2086) 2019-10-10 16:58:31 +08:00
yaml.go Yaml binding (#1618) 2018-11-06 09:49:45 +08:00
yaml_test.go Relocate binding body tests (#2086) 2019-10-10 16:58:31 +08:00