Commit Graph

24 Commits (aef7ea53b32aa336b7c41cb1ca1a5faa816be784)

Author SHA1 Message Date
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
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
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