gin/render
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
..
data.go chore: add some annotations (#1544) 2018-09-15 10:23:32 +08:00
html.go chore: add some annotations (#1550) 2018-09-15 15:21:54 +08:00
json.go Use zero-copy approach to convert types between string and byte… (#2206) 2020-01-18 00:32:50 +08:00
msgpack.go Add build tag nomsgpack (#1852) 2020-01-07 11:31:10 +08:00
protobuf.go fix errcheck warnings (#1739) 2019-01-18 09:32:53 +08:00
reader_test.go allow empty headers on DataFromReader (#2121) 2019-11-25 10:45:53 +08:00
reader.go allow empty headers on DataFromReader (#2121) 2019-11-25 10:45:53 +08:00
redirect.go v1.4.0 + #1631 (remove go1.6/go1,7 support) (#1851) 2019-05-07 18:32:32 +08:00
render_msgpack_test.go Add build tag nomsgpack (#1852) 2020-01-07 11:31:10 +08:00
render_test.go Add build tag nomsgpack (#1852) 2020-01-07 11:31:10 +08:00
render.go Add build tag nomsgpack (#1852) 2020-01-07 11:31:10 +08:00
text.go fix errcheck warnings (#1739) 2019-01-18 09:32:53 +08:00
xml.go chore: add some annotations (#1544) 2018-09-15 10:23:32 +08:00
yaml.go fix errcheck warnings (#1739) 2019-01-18 09:32:53 +08:00