1371 Commits

Author SHA1 Message Date
wuhuizuo
c9a79db31d [Update] comment for Engine() 2020-03-26 08:20:48 +00:00
wuhuizuo
abced1b159 [Roll] interface name changing 2020-03-26 07:55:35 +00:00
wuhuizuo
50f5b16990 [FIX] according review issue 2020-03-26 07:38:57 +00:00
wuhuizuo
f739b8da3b [DEL] debug message 2020-03-26 07:38:57 +00:00
wuhuizuo
7d26c24b22 [UPDATE] interface name conversion 2020-03-26 07:38:57 +00:00
wuhuizuo
e76518fde0 [FIX] fmt by suggestions from gofmt 2020-03-26 07:38:57 +00:00
wuhuizuo
a9389c0ebc [ADD] unit test for defaultValidator.Validate() 2020-03-26 07:38:57 +00:00
wuhuizuo
93f9e4860d [FIX] Validate() 2020-03-26 07:38:57 +00:00
wuhuizuo
13ea8367dc [ADD] slice/array binding support 2020-03-26 07:38:57 +00:00
thinkerou
b9c96709c0 doc: add pr link (#2298)
* doc: add pr link

* doc: add v1.6.1 release note
2020-03-26 15:36:21 +08:00
Bo-Yi Wu
3877b5e62e bump to v1.6.1 version (#2295)
Co-authored-by: thinkerou <thinkerou@gmail.com>
2020-03-26 15:36:21 +08:00
Bo-Yi Wu
0f6a9b5eac Revert "fix accept incoming network connections (#2216)" (#2294)
This reverts commit 2ff2b19e14420de970264012e1bcdf91929725b4.
2020-03-26 15:36:21 +08:00
Henry Kwan
d6461a29f0 Update version.go (#2293)
to sync with tag v1.6.0
2020-03-26 15:36:21 +08:00
Bo-Yi Wu
6e6bc3d904 docs: Add 1.6 changelogs (#2290) 2020-03-26 15:36:21 +08:00
Igor H. Vieira
d6258d1983 Improved the graceful shutdown and restart section and removed… (#2288) 2020-03-26 15:36:21 +08:00
AcoNCodes
54cac35059 Add mutex for protect Context.Keys map (#1391)
* Add mutex for protect Context.Keys map

* Fix tests

Co-authored-by: Nikolay Tolkachov <nik.tolkachov@gmail.com>
Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2020-03-26 15:36:21 +08:00
Ryan J. Yoder
a25e4708d1 Unix Socket Handling (#2280)
* do not set unix socket permissions. Cleanup unix socket.

* removed useless error checking
2020-03-26 15:36:21 +08:00
Manuel Alonso
22a881fbd6 removing log injection (#2277)
Co-authored-by: thinkerou <thinkerou@gmail.com>
2020-03-26 15:36:21 +08:00
Nikifor Seryakov
99e151e55c FileFromFS (#2112)
* Context.FileFromFS added

* Context File and FileFromFS examples at README

Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2020-03-26 15:36:21 +08:00
kebo
0b6be88bf6 fix accept incoming network connections (#2216) 2020-03-26 15:36:21 +08:00
thinkerou
5ec9888d85 ci support go1.14 (#2262) 2020-03-26 15:36:21 +08:00
Kaushik Neelichetty
170d39bd68 Use json marshall in context json to fix breaking new line issue. Fixes #2209 (#2228)
* ignore IntelliJ idea generated files

* update JSON renderer to use Marshall() instead of Encode(). Fix #2209

* Revert "ignore IntelliJ idea generated files"

This reverts commit e7bd017227df5dbd2ed2f5fe353adb5f1b08c678.

Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
Co-authored-by: thinkerou <thinkerou@gmail.com>
2020-03-26 15:36:21 +08:00
Bo-Yi Wu
ad711e1da0 docs(badge): add todo badge (#2240)
fix https://github.com/gin-gonic/gin/issues/2236

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2020-03-26 15:36:21 +08:00
thinkerou
bb79a731e4 chore: upgrade depend version (#2231) 2020-03-26 15:36:21 +08:00
thinkerou
cb605c3550 tree: range over nodes values (#2229) 2020-03-26 15:36:21 +08:00
Erik Bender
5c7a721938 add yaml negotitation (#2220)
Co-authored-by: thinkerou <thinkerou@gmail.com>
2020-03-26 15:36:21 +08:00
Bo-Yi Wu
80d049fd9b tree: remove duplicate assignment (#2222)
copy from cfa3cb764b

Co-authored-by: thinkerou <thinkerou@gmail.com>
2020-03-26 15:36:21 +08:00
Bo-Yi Wu
952204d65b docs(path): improve comments (#2223)
* chore(path): improve comments

copy from 15782a78c6

* fix typo

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2020-03-26 15:36:21 +08:00
Andy Pan
91b6a51372 Renew README to fit the modification of SetCookie method (#2217)
fix #2214
2020-03-26 15:36:21 +08:00
Bo-Yi Wu
63ac6edae2 chore: upgrade go-isatty and json-iterator/go (#2215) 2020-03-26 15:36:21 +08:00
ali
c4651b8f36 Added support for SameSite cookie flag (#1615)
* Added support for SameSite cookie flag

* fixed tests.

* Update context.go

* Update context_test.go

* Update context_test.go

Co-authored-by: thinkerou <thinkerou@gmail.com>
Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2020-03-26 15:36:21 +08:00
Andy Pan
13c883c25b 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-03-26 15:36:21 +08:00
Andy Pan
da81f42408 path: sync code with httprouter (#2212) 2020-03-26 15:36:21 +08:00
Andrey Abramov
b307e53865 Update docs on Context.Done(), Context.Deadline() and Context.Err() (#2196)
Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2020-03-26 15:36:21 +08:00
Andy Pan
cb72121e29 Reuse bytes when cleaning the URL paths (#2179)
* path: use stack buffer in CleanPath to avoid allocs in common case

Sync from 8222db13db

* path: sync test code from httprouter

* path: update path_test.go to the latest code

Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2020-03-26 15:36:21 +08:00
Antoine GIRARD
bc12fe0873 Add build tag nomsgpack (#1852)
* add build tag nomsgpack

* Update copyright

* Update copyright
2020-03-26 15:36:21 +08:00
John Bampton
0ca5bb97e5 Fix spelling (#2202) 2020-03-26 15:36:21 +08:00
John Bampton
24566bb47d Remove broken link from README. (#2198) 2020-03-26 15:36:21 +08:00
Lin Kao-Yuan
9b3477ef9d Update validator to v10 (#2190)
Passed my manual test, output nothing different.
2019-12-20 14:01:58 +08:00
飞雪无情
cc14a770cd upgrade go-validator to v10 for README (#2189) 2019-12-19 11:21:58 +08:00
Lin Kao-Yuan
1b480ed294 Update to currently output (#2188)
Excuse me, I forgot change output in #2186
2019-12-18 21:08:58 +08:00
thinkerou
d6143d8d7c tree: remove one else statement (#2177) 2019-12-18 16:58:38 +08:00
Lin Kao-Yuan
aee83e040b Fix "Custom Validators" example (#2186)
* Update fixed error code from merged commit

According to [this](874dcfa6c4) merged commit.

* Fixed incorrect testing date.

Original testing date incompatible demo require, can't get expect result.
check_in date need NOT AFTER check_out date.
2019-12-18 09:44:33 +08:00
thinkerou
168fa94516
tree: sync httprouter update (#2173) 2019-12-09 15:04:35 +08:00
thinkerou
6e16da8683
tree: sync httprouter update (#2172) 2019-12-08 19:34:05 +08:00
thinkerou
c6544855d7 tree: sync httprouter update (#2171) 2019-12-08 18:35:08 +08:00
thinkerou
7c21e04f62
fix maxParams bug (#2166) 2019-12-04 07:56:01 +08:00
Victor Castell
77b8344169 Add project to README (#2165)
Add Dkron as user of Gin in the README
2019-12-02 20:59:56 +08:00
thinkerou
3abc96e3cd
tree: sync part httprouter codes and reduce if/else (#2163) 2019-12-01 19:53:03 +08:00
Bo-Yi Wu
3957f6bb4b docs(benchmarks): for gin v1.5 (#2153) 2019-11-29 13:07:19 +08:00