-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Improve the performance by reducing duplicated reflect usage on the s… #3413
base: master
Are you sure you want to change the base?
Conversation
wln32
commented
Mar 21, 2024
- 请求开始的时候,直接反射验证数据是否合法,并返回reflect.Value,后续所有操作可以不用重复反射对象
- 修正了测试 ghttp_z_unit_feature_request_struct_test.go:510
@wln732 The ci fails. |
涉及较核心逻辑代码调整,需要花点时间 |
Involving core logic code adjustments, it will take some time to |
|
|
for k, v := range data { | ||
if v == "" { | ||
delete(data, k) | ||
} |
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.
空字符串也是值,这里恐怕不能直接删掉哦?!
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.
这里当时考虑的是,前端传的空值没啥意义,所以就把他删掉了
@wln32 这块代码看起来有点花时间,能否描述下你的改动思路? |
@wln32 This code looks a bit time-consuming. Can you describe your idea of changing it? |
I'll leave it for now, I'll update it later. |
Okay, I will take a look at this |