{"push_id":2774239298,"size":17,"distinct_size":6,"ref":"refs/heads/support-query-map","head":"50272ae566f6337116c7d66bfe4262860f64bc6b","before":"1097c1798ffeabf70d5b7712e9ecf241e93c5a7b","commits":[{"sha":"87d536c00120e6631cd7e6ff100739858e07e002","author":{"name":"田欧","email":"8cf465b1e021f8e7aaf1fa07c9cba681c67d044e@gmail.com"},"message":"utils:  use strings.Split instead of strings.IndexByte (#1400)\n\nAnd I test them benchmark:\r\n\r\ncode:\r\n\r\n```go\r\n# stringsbench.go\r\npackage stringsbench\r\n\r\nimport \"strings\"\r\n\r\nfunc index(part string) string {\r\n\tif index := strings.IndexByte(part, ';'); index >= 0 {\r\n\t\tif part := strings.TrimSpace(strings.Split(part, \";\")[0]); part != \"\" {\r\n\t\t\treturn part[0:index]\r\n\t\t}\r\n\t}\r\n\treturn \"\"\r\n}\r\n\r\nfunc split(part string) string {\r\n\treturn strings.Split(part, \";\")[0]\r\n}\r\n```\r\n\r\n```go\r\n# stringsbench_test.go\r\npackage stringsbench\r\n\r\nimport (\r\n\t\"testing\"\r\n)\r\n\r\nfunc BenchmarkIndex(b *testing.B) {\r\n\tb.RunParallel(func(pb *testing.PB) {\r\n\t\tfor pb.Next() {\r\n\t\t\tindex(\"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8\")\r\n\t\t}\r\n\t})\r\n}\r\n\r\nfunc BenchmarkSplit(b *testing.B) {\r\n\tb.RunParallel(func(pb *testing.PB) {\r\n\t\tfor pb.Next() {\r\n\t\t\tsplit(\"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8\")\r\n\t\t}\r\n\t})\r\n}\r\n```\r\n\r\nAnd the result:\r\n\r\n```shell\r\n➜  strings go test --bench=.\r\ngoos: darwin\r\ngoarch: amd64\r\nBenchmarkIndex-8   \t30000000\t        46.1 ns/op\r\nBenchmarkSplit-8   \t50000000\t        35.9 ns/op\r\nPASS\r\nok  \t_/Users/tianou/strings\t3.271s\r\n➜  strings go test --bench=.\r\ngoos: darwin\r\ngoarch: amd64\r\nBenchmarkIndex-8   \t30000000\t        44.2 ns/op\r\nBenchmarkSplit-8   \t50000000\t        34.7 ns/op\r\nPASS\r\nok  \t_/Users/tianou/strings\t3.156s\r\n➜  strings go test --bench=.\r\ngoos: darwin\r\ngoarch: amd64\r\nBenchmarkIndex-8   \t30000000\t        45.6 ns/op\r\nBenchmarkSplit-8   \t50000000\t        35.3 ns/op\r\nPASS\r\nok  \t_/Users/tianou/strings\t3.230s\r\n```","distinct":false,"url":"https://api.github.com/repos/thinkerou/gin/commits/87d536c00120e6631cd7e6ff100739858e07e002"},{"sha":"bf85b32c1d11dcfa2202daa6d1ad2addae2d1619","author":{"name":"htobenothing","email":"bb3528f72ffadb1a244fc9b0b536343f1130ffa3@gmail.com"},"message":"Add Pusher() function for support http2 server push (#1273)\n\ngin already support http2, while previously not support server push.\r\nAdd Pusher() function to extend the ResponseWriter interface.\r\n\r\n```golang\r\n// get http.Pusher\r\n if pusher := c.Writer.Pusher(); pusher != nil {\r\n     // use pusher.Push() to do server push\r\n}\r\n```\r\n<img width=\"881\" alt=\"screen shot 2018-03-07 at 11 20 49 pm\" src=\"https://user-images.githubusercontent.com/16014993/37100619-680c00c6-225e-11e8-9352-76ec3bd62894.png\">","distinct":false,"url":"https://api.github.com/repos/thinkerou/gin/commits/bf85b32c1d11dcfa2202daa6d1ad2addae2d1619"},{"sha":"737d2fb7ab4ad358c5fa01b7a08ce346dcaebd79","author":{"name":"田欧","email":"8cf465b1e021f8e7aaf1fa07c9cba681c67d044e@gmail.com"},"message":"add grpc example (#1401)\n\nuse grpc helloworld example.","distinct":false,"url":"https://api.github.com/repos/thinkerou/gin/commits/737d2fb7ab4ad358c5fa01b7a08ce346dcaebd79"},{"sha":"605aa1c30f196733a90a4f773b691d2350a30e00","author":{"name":"田欧","email":"8cf465b1e021f8e7aaf1fa07c9cba681c67d044e@gmail.com"},"message":"example: fix typo for grpc (#1405)\n\nsorry...fixed #1403","distinct":false,"url":"https://api.github.com/repos/thinkerou/gin/commits/605aa1c30f196733a90a4f773b691d2350a30e00"},{"sha":"8035359102b5384ad1f860675c85c0238b06b6e3","author":{"name":"田欧","email":"8cf465b1e021f8e7aaf1fa07c9cba681c67d044e@gmail.com"},"message":"use strings.Split instead of strings.IndexByte (#1406)","distinct":false,"url":"https://api.github.com/repos/thinkerou/gin/commits/8035359102b5384ad1f860675c85c0238b06b6e3"},{"sha":"760d0574db7432376d91b53dba9146c1f32d28c0","author":{"name":"田欧","email":"8cf465b1e021f8e7aaf1fa07c9cba681c67d044e@gmail.com"},"message":"vendor: remove vendor package from example folder (#1402)\n\nupdated `vendor.json` is ok.\r\nbut set `ignore test` in `vendor.json`, `x/net/context` package only use in `context_test.go`, I don't know why vendor still need it.\r\nplease @appleboy review the pull request, thanks a lot.","distinct":false,"url":"https://api.github.com/repos/thinkerou/gin/commits/760d0574db7432376d91b53dba9146c1f32d28c0"},{"sha":"1f59bad84b577735b27a1ee855f01ed2f50cd88b","author":{"name":"田欧","email":"8cf465b1e021f8e7aaf1fa07c9cba681c67d044e@gmail.com"},"message":"add an edge case from httprouter (#1407)","distinct":false,"url":"https://api.github.com/repos/thinkerou/gin/commits/1f59bad84b577735b27a1ee855f01ed2f50cd88b"},{"sha":"6c6d97ba2e7eeaf78e20fc4344b21c4e057e2a9a","author":{"name":"田欧","email":"8cf465b1e021f8e7aaf1fa07c9cba681c67d044e@gmail.com"},"message":"remove hardcode instead of http status value (#1411)","distinct":false,"url":"https://api.github.com/repos/thinkerou/gin/commits/6c6d97ba2e7eeaf78e20fc4344b21c4e057e2a9a"},{"sha":"c00f21ff239822d013b80e54bd403fbc08a0b5ff","author":{"name":"田欧","email":"8cf465b1e021f8e7aaf1fa07c9cba681c67d044e@gmail.com"},"message":"add go version prerequisite and debug warning (#1394)\n\n* add go version prerequisite and debug warning\r\n\r\n* merge duplicate content\r\n\r\n* remove duplicate content","distinct":false,"url":"https://api.github.com/repos/thinkerou/gin/commits/c00f21ff239822d013b80e54bd403fbc08a0b5ff"},{"sha":"eb9f313144e6768d91421855810ed5937ce348c5","author":{"name":"田欧","email":"8cf465b1e021f8e7aaf1fa07c9cba681c67d044e@gmail.com"},"message":"add comment for context (#1413)\n\nref #1075 \r\nannotation from go context source.","distinct":false,"url":"https://api.github.com/repos/thinkerou/gin/commits/eb9f313144e6768d91421855810ed5937ce348c5"},{"sha":"cdd02fa9d65c15de42f1a4522fcb9af28fe56cf9","author":{"name":"田欧","email":"8cf465b1e021f8e7aaf1fa07c9cba681c67d044e@gmail.com"},"message":"update error(err) to err (#1416)\n\nthe pull request update `return error(err)` to `return err`, and remove `kindOfData`.","distinct":false,"url":"https://api.github.com/repos/thinkerou/gin/commits/cdd02fa9d65c15de42f1a4522fcb9af28fe56cf9"},{"sha":"1c4cbfae59e0f62a6812b7808839eed45b66515f","author":{"name":"田欧","email":"8cf465b1e021f8e7aaf1fa07c9cba681c67d044e@gmail.com"},"message":"chore: remove duplicate code (#1418)","distinct":true,"url":"https://api.github.com/repos/thinkerou/gin/commits/1c4cbfae59e0f62a6812b7808839eed45b66515f"},{"sha":"d17a12591fb637da47576b8669fabb8752fe656d","author":{"name":"vz","email":"947467f3cdf6d47ca42f402289178b9252187f61@gmail.com"},"message":"update assert param(expect, actual) position (#1421)\n\n- update assert param(expect, actual) position","distinct":true,"url":"https://api.github.com/repos/thinkerou/gin/commits/d17a12591fb637da47576b8669fabb8752fe656d"},{"sha":"85221af84cf6ee99dc900bc41912abc09acfc1b5","author":{"name":"Rex Lee(李俊)","email":"43358c80115badaf9e13bdeaf42a484f93130c2d@gmail.com"},"message":"add json ASCII string render (#1358)\n\nadd a json render that rendering json as ASCII string","distinct":true,"url":"https://api.github.com/repos/thinkerou/gin/commits/85221af84cf6ee99dc900bc41912abc09acfc1b5"},{"sha":"220e8d34538f5dfdcc299dda79bf83cf52e633f6","author":{"name":"solos","email":"ab4a0a4a3af884716b6063f0465fd972481c76fa@gmail.com"},"message":"return json if jsonp has not callback (#1438)\n\nreturn json if jsonp has not callback","distinct":true,"url":"https://api.github.com/repos/thinkerou/gin/commits/220e8d34538f5dfdcc299dda79bf83cf52e633f6"},{"sha":"631cfbd1ef2374f5a01f5d17ed8c8f08779ad6fe","author":{"name":"Dmitry Dorogin","email":"f6dcec282f33bbb0e9c23892f3f3b99b7ac47105@ya.ru"},"message":"Simplify context error (#1431)\n\nHello!\r\n\r\nLooking through context package and found a little bit complicated switch block. And tried to make it easier.\r\n\r\nThanks!","distinct":true,"url":"https://api.github.com/repos/thinkerou/gin/commits/631cfbd1ef2374f5a01f5d17ed8c8f08779ad6fe"},{"sha":"50272ae566f6337116c7d66bfe4262860f64bc6b","author":{"name":"Bo-Yi Wu","email":"f80eec1bf98b3feebacc247f35f2b506218004cb@gmail.com"},"message":"Merge branch 'master' into support-query-map","distinct":true,"url":"https://api.github.com/repos/thinkerou/gin/commits/50272ae566f6337116c7d66bfe4262860f64bc6b"}]}
{"actor":{"display_login":"appleboy"}}