Kristian Svalland
8eb5f832ba
fix(router): tree bug where loop index is not decremented. ( #3460 )
...
fixes https://github.com/gin-gonic/gin/issues/3459
2023-01-07 08:57:54 +08:00
thinkerou
8b9c55e8b0
fix(route): redirectSlash bug ( #3227 )
...
fixes https://github.com/gin-gonic/gin/issues/2959
fixes https://github.com/gin-gonic/gin/issues/2282
fixes https://github.com/gin-gonic/gin/issues/2211
2022-11-06 17:02:40 +08:00
LanLanceYuan
815122a0f4
Fix a syntax error in a code comment ( #3201 )
2022-06-15 17:31:44 +08:00
Mike
1e24473f5f
Annotation fix ( #3088 )
...
* fix annotation
* fix annotation
2022-03-20 21:26:12 +08:00
MichaelDeSteven
41d38fb68c
fix typo ( #3044 )
2022-02-05 09:30:38 +08:00
jincheng9
7d189814cb
fix: wrong when wildcard follows named param ( #2983 )
2021-12-12 13:30:33 +08:00
Serica
a06d546f5c
prettify error message for catch-all conflict with existing path segment ( #2934 )
2021-11-28 09:26:17 +08:00
Ibraheem Ahmed
cbdd47a7e1
fix tsr with mixed static and wildcard paths ( #2924 )
2021-11-01 08:21:37 +08:00
市民233
1c2aa59b20
fix the misplacement of adding slashes ( #2847 )
2021-10-26 18:15:29 +08:00
Zhu Xi
3fe928994b
Update the code logic for latestNode in tree.go ( #2897 )
2021-10-23 11:58:57 +08:00
Alexander Melentyev
f3a6b69fd0
Delete unused static const ( #2830 )
2021-08-20 08:38:24 +08:00
qm012
0a55865c3f
fix #2786 ( #2796 )
...
* update match rule
* add comments
2021-07-26 10:07:54 +08:00
qm012
d4ca9a0fb1
fix #2762 ( #2767 )
2021-07-23 06:58:15 +08:00
raymonder jin
1d0f938f28
Fix insufficient slice check ( #2755 )
2021-06-25 13:22:01 +08:00
Ashwani
a8857ed70a
updated comments for Get function for params ( #2756 )
2021-06-23 11:36:24 +08:00
youzeliang
61a0cda75a
Update tree.go ( #2659 )
...
delete more "()"
2021-06-23 06:44:39 +08:00
Yue Yang
2921582d11
Fix conflict between param and exact path ( #2706 )
...
* Fix conflict between param and exact path
Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>
* Add test
Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>
* Fix prefix conflict in exact paths
Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>
* Use backtracking
Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>
* Fix panic
Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>
2021-05-19 10:05:36 +08:00
Ross Wolf
f3de8132c5
Add mixed param and non-param paths (port of httprouter#329) ( #2663 )
...
Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2021-04-06 10:49:08 +08:00
thinkerou
a573ec6a37
chore: update tree ( #2371 )
...
Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2021-01-03 21:34:11 +08:00
bestgopher
7bffae1d3d
Remove some functions that have the same effect as the bytes package ( #2387 )
2020-05-23 22:19:37 +08:00
Bo-Yi Wu
b4c8bf1bbe
chore(performance): improve countParams ( #2378 )
...
* 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
vinhha96
a6e8665e42
fix(tree): reassign fullpath when register new node which the same current node ( #2366 )
...
* 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 ( #2368 )
...
* 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
thinkerou
acac7b1210
tree: range over nodes values ( #2229 )
2020-02-09 10:46:22 +08:00
Bo-Yi Wu
0e4d8eaf07
tree: remove duplicate assignment ( #2222 )
...
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 ( #2223 )
...
* 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
thinkerou
d6143d8d7c
tree: remove one else statement ( #2177 )
2019-12-18 16:58:38 +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
thinkerou
3abc96e3cd
tree: sync part httprouter codes and reduce if/else ( #2163 )
2019-12-01 19:53:03 +08:00
ZYunH
b562fed3aa
Make countParams more readable ( #2052 )
2019-09-11 18:10:39 +08:00
bbiao
f65018d7b1
Bugfix for the FullPath feature ( #1919 )
...
* worked with more complex situations
* the original pr not work when and a short route with the same prefix
to some already added routes
2019-06-28 23:54:52 +08:00
Roman Zaynetdinov
35e33d3638
Hold matched route full path in the Context ( #1826 )
...
* Return nodeValue from getValue method
* Hold route full path in the Context
* Add small example
2019-05-26 08:20:21 +08:00
Kirill Motkov
b1d607a899
Some code improvements ( #1909 )
...
* strings.ToLower comparison changed to strings.EqualFold.
* Rewrite switch statement with only one case as if.
2019-05-21 23:08:52 +08:00
田欧
a210eea3bd
improve panic information when a catch-all wildcard conflict occurs ( #1529 )
2018-09-21 10:21:59 +08:00
Aurelien Regat-Barrel
6e09ef03b0
Fix typo in panic() message (extra single quote) ( #1352 )
...
Also fix the same typo in a comment
2018-05-11 09:57:21 +08:00
Boris Borshevsky
6f94fd05c9
Linting and optimizing struct memory signature. ( #1184 )
...
* fix cleanPath spell (#969 )
* linter and optimize structs
2017-11-29 10:50:14 +08:00
田欧
a8fa424ae5
update comment ( #1057 )
2017-08-16 11:55:50 +08:00
田欧
b985857899
update func comment ( #981 )
2017-07-05 20:28:16 -05:00
田欧
7d043cedb1
improved swap ( #974 )
2017-07-04 20:55:50 -05:00
Javier Provecho Fernandez
80942e67a8
docs(license): add julienschmidt/httprouter license URL
2017-06-27 22:58:49 +02:00
Javier Provecho Fernandez
3b8150c83c
Revert "unify license ( #942 )"
...
This reverts commit 53799774f4
.
2017-06-27 22:54:42 +02:00
田欧
6dac8c8a48
delete else keyword ( #948 )
2017-06-12 22:36:05 -05:00
田欧
53799774f4
unify license ( #942 )
2017-06-12 04:01:09 -05:00
Sergey Egorov
b1872ec369
The url.RawPath used when engine.UseRawPath is set to true. ( #810 )
2017-02-28 18:29:41 +08:00
Javier Provecho Fernandez
9e930b9bdd
lint code
2016-04-15 01:16:46 +02:00
Manu Mtz.-Almeida
20825e7694
Updates tree.go from httpRouter
2016-01-28 00:14:26 +01:00
Manu Mtz-Almeida
66e9feb622
Optimizes tree lookup
2015-05-29 21:03:28 +02:00