Improve the performance by reducing duplicated reflect usage on the s…
- 请求开始的时候,直接反射验证数据是否合法,并返回reflect.Value,后续所有操作可以不用重复反射对象
- 修正了测试 ghttp_z_unit_feature_request_struct_test.go:510
@wln732 The ci fails.
涉及较核心逻辑代码调整,需要花点时间review。
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
Involving core logic code adjustments, it will take some time to review.
涉及较核心逻辑代码调整,需要花点时间
review。 ======== 其实设置default 和in tag 那里可以直接用反射赋值了,不需要再去判断data里有没有同名的,这样实现也很直观,如果data中设置了值,那后面再走gocnv.Struct这里赋值就好了
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
Involving core logic code adjustments, it will take some time to
review. ======== In fact, when setting default and in tag, you can directly use reflection to assign values. There is no need to judge whether there is a value with the same name in the data. This implementation is also very intuitive. If the value is set in the data, then go to gocnv.Struct to assign the value later. Got it
@wln32 这块代码看起来有点花时间,能否描述下你的改动思路?
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
@wln32 This code looks a bit time-consuming. Can you describe your idea of changing it?
@wln32 这块代码看起来有点花时间,能否描述下你的改动思路?
@gqcn 先放放吧,后面在更新, 其实这块的代码,可以先做请求校验,然后在用gconv做赋值,还有defaut和header那里也可以再优化优化
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
@wln32 This code looks a bit time-consuming. Can you describe your ideas for changes?
I'll leave it for now, I'll update it later. In fact, for this piece of code, you can first do request verification, and then use gconv to do the assignment. You can also optimize defaut and header.
@wln32 这块代码看起来有点花时间,能否描述下你的改动思路?
@gqcn 先放放吧,后面在更新, 其实这块的代码,可以先做请求校验,然后在用gconv做赋值,还有defaut和header那里也可以再优化优化
好的,这个pr我过段时间就会来看看,不过由于需要持续review但经常被打断,那我优先去看看你对http server路由的优化吧。
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
@wln32 This code looks a bit time-consuming. Can you describe your ideas for changes?
@gqcn Let’s put it down for now and update it later. In fact, for this piece of code, you can first perform request verification, and then use gconv to do the assignment. You can also optimize defaut and header.
Okay, I will take a look at this pr in a while, but since I need to continue review but it is often interrupted, then I will give priority to taking a look at your optimization of http server routing.