You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/11/14 08:27:17 UTC

[GitHub] [dubbo-go-hessian2] wongoo opened a new pull request #288: fix EOF error check & fix go name

wongoo opened a new pull request #288:
URL: https://github.com/apache/dubbo-go-hessian2/pull/288


   <!--  Thanks for sending a pull request! 
   -->
   
   **What this PR does**:
   - fix EOF error check 
   - fix go type name generation, which use the type name as go type name  if it's already contains the package.
   
   **Special notes for your reviewer**:
   
   if the type name contains '.' , then it's considered to the name with package , like "time.Time". 
   So just simple to check whether contains '.',  and the performance has a great improvement than regex pattern check.
   
   **Does this PR introduce a user-facing change?**:
   ```release-note
   - fix EOF error check 
   - fix go type name generation, which use the type name as go type name  if it's already contains the package.
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-hessian2] wongoo merged pull request #288: fix EOF error check

Posted by GitBox <gi...@apache.org>.
wongoo merged pull request #288:
URL: https://github.com/apache/dubbo-go-hessian2/pull/288


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-hessian2] wongoo commented on pull request #288: fix EOF error check

Posted by GitBox <gi...@apache.org>.
wongoo commented on pull request #288:
URL: https://github.com/apache/dubbo-go-hessian2/pull/288#issuecomment-969729047


   @justxuewei  I have updated this pr, this pr contains only one fix for EOF error check.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-hessian2] codecov-commenter edited a comment on pull request #288: fix EOF error check

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #288:
URL: https://github.com/apache/dubbo-go-hessian2/pull/288#issuecomment-968427324


   # [Codecov](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/288?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#288](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/288?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (8798395) into [master](https://codecov.io/gh/apache/dubbo-go-hessian2/commit/ad93624278b2ece6555d533664e957e2902bf8a5?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (ad93624) will **not change** coverage.
   > The diff coverage is `50.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/288/graphs/tree.svg?width=650&height=150&src=pr&token=Yh82j7lS1W&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/288?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@           Coverage Diff           @@
   ##           master     #288   +/-   ##
   =======================================
     Coverage   70.13%   70.13%           
   =======================================
     Files          27       27           
     Lines        3034     3034           
   =======================================
     Hits         2128     2128           
     Misses        680      680           
     Partials      226      226           
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/288?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [decode.go](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/288/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZGVjb2RlLmdv) | `69.46% <0.00%> (ø)` | |
   | [java\_sql\_time.go](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/288/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-amF2YV9zcWxfdGltZS5nbw==) | `63.88% <0.00%> (ø)` | |
   | [object.go](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/288/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-b2JqZWN0Lmdv) | `65.69% <0.00%> (ø)` | |
   | [list.go](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/288/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-bGlzdC5nbw==) | `84.61% <100.00%> (ø)` | |
   | [map.go](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/288/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-bWFwLmdv) | `58.06% <100.00%> (ø)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/288?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/288?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [ad93624...8798395](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/288?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-hessian2] justxuewei commented on a change in pull request #288: fix EOF error check & fix go name

Posted by GitBox <gi...@apache.org>.
justxuewei commented on a change in pull request #288:
URL: https://github.com/apache/dubbo-go-hessian2/pull/288#discussion_r749833232



##########
File path: hessian_test/dup_struct_name_test.go
##########
@@ -181,3 +181,9 @@ func checkResponseBody(t *testing.T, decodedResponse *hessian.Response, h *hessi
 	out, _ := hessian.EnsureInterface(hessian.UnpackPtrValue(hessian.EnsurePackValue(decodedResponse.RspObj)), nil)
 	assert.Equal(t, in, out)
 }
+
+func TestGetGoName(t *testing.T) {
+	assert.Equal(t, "time.Time", hessian.GetGoName(time.Now()))
+	assert.Equal(t, "github.com/apache/dubbo-go-hessian2/hessian_test_test/hessian_test.CaseZ", hessian.GetGoName(&CaseZ{}))
+	assert.Equal(t, "github.com/apache/dubbo-go-hessian2/hessian_test/hessian_test/hessian_test.CaseZ", hessian.GetGoName(&dupclass.CaseZ{}))
+}

Review comment:
       Why test GetGoName twice? I think the test cases could be removed, and use the use cases at `pojo_test.go`.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-hessian2] codecov-commenter commented on pull request #288: fix EOF error check & fix go name

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #288:
URL: https://github.com/apache/dubbo-go-hessian2/pull/288#issuecomment-968427324


   # [Codecov](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/288?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#288](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/288?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (31e7f97) into [master](https://codecov.io/gh/apache/dubbo-go-hessian2/commit/3a4ef0be57cec0ab889e3a0b22e546df24e2e6a8?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (3a4ef0b) will **decrease** coverage by `0.17%`.
   > The diff coverage is `68.75%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/288/graphs/tree.svg?width=650&height=150&src=pr&token=Yh82j7lS1W&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/288?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master     #288      +/-   ##
   ==========================================
   - Coverage   70.26%   70.08%   -0.18%     
   ==========================================
     Files          27       27              
     Lines        3033     3032       -1     
   ==========================================
   - Hits         2131     2125       -6     
   - Misses        677      681       +4     
   - Partials      225      226       +1     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/288?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [decode.go](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/288/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZGVjb2RlLmdv) | `69.46% <0.00%> (ø)` | |
   | [java\_sql\_time.go](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/288/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-amF2YV9zcWxfdGltZS5nbw==) | `63.88% <50.00%> (-2.78%)` | :arrow_down: |
   | [object.go](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/288/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-b2JqZWN0Lmdv) | `65.69% <50.00%> (-0.59%)` | :arrow_down: |
   | [pojo.go](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/288/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cG9qby5nbw==) | `63.28% <83.33%> (-0.66%)` | :arrow_down: |
   | [list.go](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/288/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-bGlzdC5nbw==) | `84.61% <100.00%> (ø)` | |
   | [map.go](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/288/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-bWFwLmdv) | `58.06% <100.00%> (ø)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/288?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/288?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [3a4ef0b...31e7f97](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/288?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org