-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce go chi web framework as frontend of macaron, so that we can move routes from macaron to chi step by step #7420
Conversation
related with #7403 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
its gitea_v1.14 time ... lests start with it
Codecov Report
@@ Coverage Diff @@
## master #7420 +/- ##
==========================================
+ Coverage 42.17% 42.19% +0.02%
==========================================
Files 695 696 +1
Lines 76370 76407 +37
==========================================
+ Hits 32206 32241 +35
- Misses 38880 38885 +5
+ Partials 5284 5281 -3
Continue to review full report at Codecov.
|
…be easier to migrate macaron routes to chi routes later
@lafriks done. |
@lunny the chi router do not pass things to our logger :/ |
🚀 |
LGTM does not seems to like me :/ |
According to #7403, we should chose go-chi as Gitea's backend web framework.
Why we should move away from macaron, see @zeripath 's comment #7403 (comment)
This PR will not finish all the work to remove macaron, but it will introduce go chi as the frontend of macaron. Only most middlewares and serval routes will be handled by go chi, and most routes will still be handled by macaron. To implement that, a go chi middleware is written to delegate the HTTP requests to macaron.
A difference between chi and macaron is macaron will set req.Body back but chi will not after consumed the request. That's why the changes to the test is in this PR.
It's ready to review now.