Commit Graph

45 Commits (main)

Author SHA1 Message Date
Kashiwa 6953325df5
♻️ Refactor: replace findLastCharsetPosition with strings.LastIndexByte (#3338)
* ♻️ Refactor: replace findLastCharsetPosition with strings.LastIndexByte

* 🩹 Fix: correct loop condition in Go benchmark
2025-03-06 09:00:18 +01:00
Juan Calderon-Perez 25e399213c
chore: Add support for go1.23 and golangci-lint v1.60.1 (#3101)
* Bump min go to 1.22, bump golangci-lint to v1.60.1, regenerate all msgp

* Fix golanci-lint issues

* Fix golanci-lint issues
2024-08-14 09:14:04 +02:00
Muhammed Efe Cetin 6ea4d81331
Merge branch 'master' into v3-beta 2023-11-07 20:22:31 +03:00
M. Efe Çetin 1dea615ddf
🔥 add config to enable splitting by comma in parsers (#2560)
* 🔥 add config to enable splitting by comma in parsers

🔥 add config to enable splitting by comma in parsers

* optimize if statements, remove escape char support

optimize if statements, remove escape char support

* update
2023-08-21 09:44:02 +02:00
Muhammed Efe Cetin 75bb02b87e
Merge remote-tracking branch 'origin/master' into v3-beta 2023-08-05 22:02:01 +03:00
RW 182f9f0970
🚀 Speedup and cleanup "path" testcases and benchmarks (#2465) 2023-05-17 15:45:38 +02:00
Muhammed Efe Çetin 3168a60605
👷 v3 (ci): fix some linter warnings 2023-02-09 23:15:21 +03:00
Muhammed Efe Çetin 088cde594d
Merge remote-tracking branch 'origin/master' into v3-beta 2023-02-05 23:43:42 +03:00
leonklingele 167a8b5e94
🚀 Feature: Add and apply more stricter golangci-lint linting rules (#2286)
* golangci-lint: add and apply more stricter linting rules

* github: drop security workflow now that we use gosec linter inside golangci-lint

* github: use official golangci-lint CI linter

* Add editorconfig and gitattributes file
2023-01-27 09:01:37 +01:00
M. Efe Çetin 5406560033
🧹 chore: make most tests parallel (#2299)
* 🧹 chore: make most tests parallel

* revert some tests

* revert some tests

* revert some tests
2023-01-15 23:21:37 +08:00
pj f13c948e36
Match function (#2142)
Add matching function

Co-authored-by: rocketlaunchr-cto <rocketlaunchr.cloud@gmail.com>
2022-12-11 17:37:35 +01:00
M. Efe Çetin 077a5dc3d4
🐛 bug: fix regex constraints that contain comma (#2256) 2022-12-05 08:27:31 +01:00
Muhammed Efe Çetin c62dd16e8d
Merge remote-tracking branch 'origin/master' into v3-beta 2022-11-27 20:34:48 +03:00
James R T c63a569a92
🚀 [Feature]: Allow optional params with route constraints (#2179)
Signed-off-by: James R T <jamestiotio@gmail.com>

Signed-off-by: James R T <jamestiotio@gmail.com>
2022-11-01 08:49:44 +01:00
Muhammed Efe Çetin 9428befb9c
Merge remote-tracking branch 'origin/master' into v3-beta 2022-10-28 17:26:17 +03:00
M. Efe Çetin 35753f7eac
🐛 bug: fix constraints when to use multiple params (#2077)
* 🐛 bug: fix constraints when to use multiple params

* test case route matching
remove the parameters for negative routing matches, as they are unnecessary and should not be considered there

Co-authored-by: René Werner <rene@gofiber.io>
2022-09-08 07:29:05 +02:00
Muhammed Efe Çetin 319b8ea3a8
Merge remote-tracking branch 'origin/master' into v3-beta 2022-09-03 23:56:45 +03:00
M. Efe Çetin e72ea32dd2
🐛 bug: fix regex constraints (#2059) 2022-08-30 08:40:58 +02:00
M. Efe Çetin aef7ea53b3
🐛 bug: fix route constraints problems (#2033)
* 🐛 bug: fix route constraints problems

* escape support for data

* exactLen -> len
2022-08-26 14:16:06 +02:00
Trim21 c964fda009
v3(tests): use testify for assertion (#2036)
* replace

* write

* rewrite more

* rewrite

* rewrite

* fix

* rewrite
2022-08-22 07:57:10 +02:00
Muhammed Efe Çetin 4105b008c2
Merge remote-tracking branch 'origin/master' into v3-beta 2022-08-19 14:33:31 +03:00
M. Efe Çetin 2517944c80
feature: route constraints (#1998)
* Segment parameters constraints and determining it's type

* add parsing for constraints.

* fix tests

* add tests, benchs & some fixes.

* fix regex & datetime tests.

* clean up constraint parser, multiple constraint support.

* update

* regex customization.

* constants, remove variadic methods.

* add some benchs, refactor constraint check funtion.

* more readable conditions

* fix tests

* precompile regex

* precompile regex when parsing the route

* update comments
Co-authored-by: wernerr <rene@gofiber.io>

Co-authored-by: Mohab Abd El-Dayem <mohab.m.mohamed@gmail.com>
Co-authored-by: RW <rene@gofiber.io>
2022-08-16 08:05:50 +02:00
RW ff1e0109a3
Closes #1931 "🤗 How to get path param before a custom verb?" (#1983)
* Add possibility for parameters before custom verb
FIX for "🤗 How to get path param before a custom verb? #1931"

* try to stabilize the tests
2022-07-27 08:37:03 +02:00
Muhammed Efe Çetin 1188144d78
🎉 v3: init 2022-05-31 17:35:49 +03:00
Gusted 7b7dcf29f7
♻️ Tidy up the codebase (#1613)
* run gofmt

* add t.Helper()

* Simplify assigns

* Simplify make operation

* Remove unused field in struct

* Fix typo

* Run gofumpt ./

* Consistent spacing

* len(...) can never be negative

* Use ReplaceAll

* Simplify operation

* Remove deadcode

* Fix typo

* Tidy up `} else { if ...`

* Fix AssertEqual

* Remove t.Helper() to fix go1.14.15
2021-11-05 08:00:03 +01:00
RW 87b0a15f1e
Fix - prevent panic on GetTrimmedParam (#1593)
Close #1587
2021-10-25 07:25:31 +02:00
RW 033184938c
🚀 new possibility to escape special routing parameters (#1280)
* 🚀 new possibility to escape special routing parameters, which gives the possibility to follow the google api design guide https://cloud.google.com/apis/design/custom_methods

* 🚀 new possibility to escape special routing parameters, which gives the possibility to follow the google api design guide https://cloud.google.com/apis/design/custom_methods
2021-04-12 21:45:24 +02:00
RW 6ffc89f18b
🐛 Fix wrong route matching for not greedy parameter (#1017)
* 🐛 Fix wrong route matching for not greedy parameter
#1016

Co-authored-by: Fenny <fenny@gofiber.io>
2020-11-13 16:27:23 +01:00
Fenny b96cbff310
Merge pull request #774 from Fenny/master
👂 uncomment internal benchmarks
2020-09-14 12:15:24 +02:00
Fenny 2768ea2a77 🙌 make utils public
Co-Authored-By: RW <7063188+ReneWerner87@users.noreply.github.com>
2020-09-14 12:12:29 +02:00
ReneWerner87 712b585b9d 🪓 Code separation for utils (🧹clean code)
Co-authored-by: Fenny <fenny@gofiber.io>
Co-authored-by: Kiyon <kiyon@gofiber.io>
2020-09-14 10:23:22 +02:00
Fenny a3cac71ae8 🔦 move utils to internal 2020-09-14 09:09:06 +02:00
Fenny ec5d66e7a8 v2 2020-09-13 11:20:11 +02:00
ReneWerner87 053d463fa6 🚀 improve routing behavior 2020-08-10 10:14:17 +02:00
ReneWerner87 67caca823b 🚀 improve routing behavior 2020-08-10 09:50:53 +02:00
ReneWerner87 d9c09fa68e 🚀 improve routing behavior 2020-08-09 19:50:10 +02:00
ReneWerner87 b8ca4c9b8a 🚀 improve routing behavior 2020-08-07 21:42:53 +02:00
ReneWerner87 30081db4fa 🚀 improve routing behavior 2020-08-07 14:41:53 +02:00
ReneWerner87 2283fd2756 🚀 improve routing behavior 2020-08-07 14:38:40 +02:00
ReneWerner87 a1148391ea 🚀 improve routing behavior 2020-08-06 02:36:05 +02:00
Fenny 4de6250e74 📦 Remove Parallel from global test 2020-07-09 13:37:43 +02:00
kiyon 96371a2869 💯 improve path.go coverage 2020-07-09 15:51:04 +08:00
Fenny e0c7179715 🔍 Add small test case 2020-07-06 18:00:07 +02:00
Fenny 1d4478bf00 🧹🧹 Cleanup 2020-07-02 13:51:10 +02:00
wernerr e674d679df move path matching and registration in separate file "path.go" 2020-06-14 12:37:09 +02:00