1391 Commits

Author SHA1 Message Date
Johnny Dallas
4cabdd303f
Add CustomRecovery builtin middleware ()
* Add CustomRecovery and CustomRecoveryWithWriter methods

* add CustomRecovery example to README

* add test for CustomRecovery

* support RecoveryWithWriter(io.Writer, ...RecoveryFunc)
2020-07-09 09:40:00 +08:00
Vas N
5e40c1d49c
DebugPrintRouteFunc() unit test ()
Co-authored-by: thinkerou <thinkerou@gmail.com>
2020-05-25 21:47:06 +08:00
bestgopher
c9b8535817
Rename some variables () 2020-05-25 20:13:09 +08:00
Miles
5f261fa752
Add a redirect sample for POST method ()
* Add a redirect sample for POST method

Refer to issue https://github.com/gin-gonic/gin/issues/444

* put an empty line before 1396

Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2020-05-24 11:37:32 +08:00
bestgopher
9221381443
remove a unused type SecureJSONPrefix () 2020-05-24 10:58:28 +08:00
thinkerou
2773ce6e60
add copyright ()
Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2020-05-23 22:52:01 +08:00
bestgopher
7bffae1d3d
Remove some functions that have the same effect as the bytes package () 2020-05-23 22:19:37 +08:00
Sudhir Mishra
acbb3d4f42
Broken link repo typo fix () 2020-05-18 15:50:35 +08:00
Bo-Yi Wu
b4c8bf1bbe
chore(performance): improve countParams ()
* update

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* chore: update

* chore: improve countParams performance

* update

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* chore: add comment
2020-05-17 18:11:22 +08:00
thinkerou
1d5b9badd9
chore: rename getQueryCache/getFormCache to initQueryCache/initFormCache () 2020-05-14 11:35:14 +08:00
vinhha96
a6e8665e42
fix(tree): reassign fullpath when register new node which the same current node ()
* fix(tree): assign fullpath to current node by fullpath of new node if current node the same new node

* test(router-test): reverse the order when register router when test func GetFullPath

* chg(tree-test): update test case with register new route in TestRouteContextHoldsFullPath

Co-authored-by: vinhha <vinhha@vng.com.vn>
Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2020-05-11 13:25:49 +08:00
Bo-Yi Wu
d17270dd90
Sync route tree to httprouter latest code ()
* update tree

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* update

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* update

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* update countParams

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* fix testing

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* update

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* update

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* udpate

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* fix testing

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* refactor gin context

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* add fullPath

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* chore: refactor

* remove unused code

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* remove varsCount

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* refactor

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2020-05-10 13:22:25 +08:00
Bo-Yi Wu
6f3d96ccff
chore: improve render string performance () 2020-05-09 17:41:00 +08:00
Anup Kumar Panwar
82b284fd77
uncomment the code () 2020-05-08 08:50:26 +08:00
bn4t
235898e642
Fix typo () 2020-05-05 23:20:00 +08:00
Bo-Yi Wu
05464a8f6b
docs: update benchmark result v1.6.3 () 2020-05-05 16:37:40 +08:00
thinkerou
747efffd2a
chore: update godoc address () 2020-05-05 14:06:42 +08:00
thinkerou
6ac7f194c4
chore: update some code style () 2020-05-05 13:55:57 +08:00
thinkerou
54175dbe72
chore: update the result of CR ()
* chore: update the result of CR

* Update utils.go

* Update utils.go

* Update context.go

* Update context.go
2020-05-04 11:40:41 +08:00
Bo-Yi Wu
abc4fa0718
Release v1.6.3 version ()
* chore: update version to v1.6.3

* update changelog

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2020-05-03 21:12:07 +08:00
Bo-Yi Wu
2c43278080
chore(performance): Change *sync.RWMutex to sync.RWMutex () 2020-05-03 20:39:34 +08:00
Ronald Petty
4427ca4a60
Update gin_integration_test.go ()
* Update gin_integration_test.go

TestUnixSocket fails if you run it twice in a row.  This is due to the unix socket file persisting.  Added defer to clean up.

Whats unclear is the following test TestBadUnixSocket I suspect is just looking for cruft maybe from a prior test or defaults not working, I have not enough background to say.

* Update gin_integration_test.go

I believe there is some tab issue here, tried to manual overwrite it now.

* Update gin_integration_test.go

squash you dang spaces!!!
2020-04-28 09:36:04 +08:00
Qt
be4ba7d9df
update: CHANGELOG.md add log for version 1.6.2 () 2020-04-20 20:07:36 +08:00
Johnny Dallas
90fff292d7
fix typo in the PR template and CONTRIBUTING files ()
Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2020-04-17 12:26:42 +08:00
bestgopher
a4e947a356
update:SetMode function () 2020-04-16 22:31:58 +08:00
Shilin Wang
4f208887e1
update set cookie example ()
fix 
2020-04-08 23:31:31 +08:00
Henry Kwan
3315353c20
Update version.go ()
sync to tag v1.6.2
2020-03-27 21:39:11 +08:00
Bo-Yi Wu
298ebca691
fix missing initial sync.RWMutex ()
* fix missing initial sync.RWMutex

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* Add unit testing.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2020-03-27 10:57:36 +08:00
Bo-Yi Wu
57f99ca50f
Add set samesite in cookie. ()
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2020-03-27 10:47:22 +08:00
thinkerou
bd5ee1aae2
doc: add pr link ()
* doc: add pr link

* doc: add v1.6.1 release note
2020-03-24 22:49:34 +08:00
Bo-Yi Wu
07a6818d24
bump to v1.6.1 version ()
Co-authored-by: thinkerou <thinkerou@gmail.com>
2020-03-23 18:00:58 +08:00
Bo-Yi Wu
1bebd9af91
Revert "fix accept incoming network connections ()" ()
This reverts commit 2ff2b19e14420de970264012e1bcdf91929725b4.
2020-03-23 17:48:25 +08:00
Henry Kwan
ae88831448
Update version.go ()
to sync with tag v1.6.0
2020-03-23 13:52:28 +08:00
Bo-Yi Wu
a412209e60
docs: Add 1.6 changelogs () 2020-03-22 12:28:46 +08:00
Igor H. Vieira
c4fd2489ce
Improved the graceful shutdown and restart section and removed… () 2020-03-22 10:25:35 +08:00
AcoNCodes
73ccfea3ba
Add mutex for protect Context.Keys map ()
* 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-17 00:52:02 +08:00
Ryan J. Yoder
67008be35f
Unix Socket Handling ()
* do not set unix socket permissions. Cleanup unix socket.

* removed useless error checking
2020-03-16 22:36:15 +08:00
Manuel Alonso
a71af9c144
removing log injection ()
Co-authored-by: thinkerou <thinkerou@gmail.com>
2020-03-07 21:51:33 +08:00
Nikifor Seryakov
1d055af1bc
FileFromFS ()
* Context.FileFromFS added

* Context File and FileFromFS examples at README

Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2020-03-07 10:23:33 +08:00
kebo
2ff2b19e14
fix accept incoming network connections () 2020-03-07 09:21:02 +08:00
thinkerou
094b3fdb39
ci support go1.14 () 2020-02-26 10:27:03 +08:00
Kaushik Neelichetty
5f56109bcf
Use json marshall in context json to fix breaking new line issue. Fixes ()
* ignore IntelliJ idea generated files

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

* 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-02-21 17:15:17 +08:00
Bo-Yi Wu
863ad2d4de
docs(badge): add todo badge ()
fix https://github.com/gin-gonic/gin/issues/2236

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2020-02-21 16:33:36 +08:00
thinkerou
0d12918b0a
chore: upgrade depend version () 2020-02-13 20:23:29 +08:00
thinkerou
acac7b1210
tree: range over nodes values () 2020-02-09 10:46:22 +08:00
Erik Bender
731c827892
add yaml negotitation ()
Co-authored-by: thinkerou <thinkerou@gmail.com>
2020-02-06 14:50:21 +08:00
Bo-Yi Wu
0e4d8eaf07
tree: remove duplicate assignment ()
copy from cfa3cb764b

Co-authored-by: thinkerou <thinkerou@gmail.com>
2020-01-28 18:35:47 +08:00
Bo-Yi Wu
64e6a7654f docs(path): improve comments ()
* chore(path): improve comments

copy from 15782a78c6

* fix typo

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2020-01-28 11:38:45 +08:00
Andy Pan
07c0f05f24 Renew README to fit the modification of SetCookie method ()
fix 
2020-01-23 07:54:08 +08:00
Bo-Yi Wu
69a202dbbd chore: upgrade go-isatty and json-iterator/go () 2020-01-22 00:24:25 +08:00