-
Notifications
You must be signed in to change notification settings - Fork 500
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
rework for go-chi #23
Conversation
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.
Thanks for your contribution. It's totally OK to use a new web framework to handle admin API. But there's one thing I'm considering. The chi
looks like a little low level by comparing with echo[1], which tries to be compatible with stdlib. How do you consider it?
good comments thank you both, let me clean all this up. also, ya echo would be fine and maybe thats a smaller code change overall, let me review that and see how it works out |
Ok folks, that should address the comments you gave. Im not sure I like the logging implementation, the http helpers and lack of http tests, so I might tackle that next |
For a performance comparison, here is a quick look using Iris:
Chi:
And for Iris:
Chi:
|
i guess i didnt try add r.ContentLength last night 🤦 , but i added it now and it seems to work just fine so that should wrap up the logger |
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.
LGTM
its worth mentioning that I did roll through 80% of adding the echo framework as well, just to see how it went and it was a bit harder to implement due mainly to how the easegress framework is currently structured. It might be something to return to after some time. |
@bigangryrobot Thank you so much for contributing this PR and providing a performance quick look. The Feel free to open an issue about bug reportings, design discussions, or new feature proposals. |
Sure, I just think echo got higher abstraction than chi in some ways. But chi is fine in this simple scenario. Thanks for your contribution! |
* rework for go-chi * cleanup chi implementation * add r.ContentLength to logger Co-authored-by: cbeverlin <cbeverlin@tesla.com>
there seems to be a few reasons to not use iris, here is a chi implementation
https://www.reddit.com/r/golang/comments/b481q7/a_warning_about_githubcomkatarasiris/
the-benchmarker/web-frameworks#1129
https://www.reddit.com/r/golang/comments/57w79c/why_you_really_should_stop_using_iris/