apache / apisix-go-plugin-runner

Go Plugin Runner for APISIX
https://apisix.apache.org/
Apache License 2.0
167 stars 69 forks source link

refactor: inHTTP.Header #156

Closed reatang closed 5 months ago

reatang commented 5 months ago

Header should manage its own changes and builds

monkeyDluffy6017 commented 5 months ago

So what you have done is encapsulating releated methods in the header object?

monkeyDluffy6017 commented 5 months ago

please make the ci pass

reatang commented 5 months ago

So what you have done is encapsulating releated methods in the header object?

Yes, make the Header function cohesive.


In fact, from a programming perspective, it should not be designed in this way, which couples the presentation layer and the application layer. An encoding layer for fbs and golang objects should be provided. Now what I do is explicitly layer it in a class.

其实从程序设计角度来说,不应该如此设计,这让表现层和应用层耦合了。应该提供一层 fbs 和 golang 对象的转换层。现在我做的就是在一个类型中显式的分层。

codecov-commenter commented 5 months ago

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (a265bcd) 79.62% compared to head (5b5d631) 79.78%.

:exclamation: Current head 5b5d631 differs from pull request most recent head 8a00498. Consider uploading reports for the commit 8a00498 to get more accurate results

Files Patch % Lines
internal/http/header.go 97.82% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #156 +/- ## ========================================== + Coverage 79.62% 79.78% +0.16% ========================================== Files 17 17 Lines 1060 1039 -21 ========================================== - Hits 844 829 -15 + Misses 164 158 -6 Partials 52 52 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

monkeyDluffy6017 commented 5 months ago

please make the ci pass