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/10/11 09:19:44 UTC
[GitHub] [dubbo-go-hessian2] ChangedenCZD opened a new pull request #283: fixed: #282
ChangedenCZD opened a new pull request #283:
URL: https://github.com/apache/dubbo-go-hessian2/pull/283
<!-- Thanks for sending a pull request!
-->
**What this PR does**:
**Which issue(s) this PR fixes**:
<!--
*Automatically closes linked issue when PR is merged.
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
_If PR is about `failing-tests or flakes`, please post the related issues/tests in a comment and do not use `Fixes`_*
-->
Fixes #282
**Special notes for your reviewer**:
**Does this PR introduce a user-facing change?**:
<!--
If no, just write "NONE" in the release-note block below.
If yes, a release note is required:
Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required".
-->
```release-note
NONE
```
--
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] ChangedenCZD commented on a change in pull request #283: fixed: #282
Posted by GitBox <gi...@apache.org>.
ChangedenCZD commented on a change in pull request #283:
URL: https://github.com/apache/dubbo-go-hessian2/pull/283#discussion_r726695181
##########
File path: encode.go
##########
@@ -155,6 +162,14 @@ func (e *Encoder) Encode(v interface{}) error {
default:
t := UnpackPtrType(reflect.TypeOf(v))
+
+ if DecodeTypeRegexp.Match([]byte(t.String())) { // unpack base type
Review comment:
如果移动到下面的default,会进行了其它无用的判断
--
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] ChangedenCZD commented on pull request #283: fixed: #282
Posted by GitBox <gi...@apache.org>.
ChangedenCZD commented on pull request #283:
URL: https://github.com/apache/dubbo-go-hessian2/pull/283#issuecomment-939904853
暂时有bug,待修复
--
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 #283: fixed: #282
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #283:
URL: https://github.com/apache/dubbo-go-hessian2/pull/283#issuecomment-940578353
# [Codecov](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/283?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 [#283](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/283?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (cbad558) into [master](https://codecov.io/gh/apache/dubbo-go-hessian2/commit/a0c5132ce20b13ad397873265fcd28e82ac2c6e6?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (a0c5132) will **decrease** coverage by `0.03%`.
> The diff coverage is `100.00%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/283/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/283?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 #283 +/- ##
==========================================
- Coverage 70.21% 70.17% -0.04%
==========================================
Files 27 27
Lines 3028 3034 +6
==========================================
+ Hits 2126 2129 +3
- Misses 677 678 +1
- Partials 225 227 +2
```
| [Impacted Files](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/283?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [encode.go](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/283/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-ZW5jb2RlLmdv) | `75.00% <100.00%> (-1.86%)` | :arrow_down: |
| [pojo.go](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/283/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.94% <0.00%> (+0.35%)` | :arrow_up: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/283?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/283?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 [a0c5132...cbad558](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/283?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] codecov-commenter edited a comment on pull request #283: fix issue #282
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #283:
URL: https://github.com/apache/dubbo-go-hessian2/pull/283#issuecomment-940578353
# [Codecov](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/283?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 [#283](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/283?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (43d1925) into [master](https://codecov.io/gh/apache/dubbo-go-hessian2/commit/a0c5132ce20b13ad397873265fcd28e82ac2c6e6?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (a0c5132) will **increase** coverage by `0.05%`.
> The diff coverage is `100.00%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/283/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/283?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 #283 +/- ##
==========================================
+ Coverage 70.21% 70.27% +0.05%
==========================================
Files 27 27
Lines 3028 3034 +6
==========================================
+ Hits 2126 2132 +6
Misses 677 677
Partials 225 225
```
| [Impacted Files](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/283?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [encode.go](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/283/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-ZW5jb2RlLmdv) | `77.67% <100.00%> (+0.82%)` | :arrow_up: |
| [pojo.go](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/283/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.94% <0.00%> (+0.35%)` | :arrow_up: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/283?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/283?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 [a0c5132...43d1925](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/283?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] codecov-commenter edited a comment on pull request #283: fix issue #282
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #283:
URL: https://github.com/apache/dubbo-go-hessian2/pull/283#issuecomment-940578353
# [Codecov](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/283?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 [#283](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/283?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (041146a) into [master](https://codecov.io/gh/apache/dubbo-go-hessian2/commit/a0c5132ce20b13ad397873265fcd28e82ac2c6e6?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (a0c5132) will **increase** coverage by `0.05%`.
> The diff coverage is `100.00%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/283/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/283?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 #283 +/- ##
==========================================
+ Coverage 70.21% 70.27% +0.05%
==========================================
Files 27 27
Lines 3028 3034 +6
==========================================
+ Hits 2126 2132 +6
Misses 677 677
Partials 225 225
```
| [Impacted Files](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/283?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [encode.go](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/283/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-ZW5jb2RlLmdv) | `77.67% <100.00%> (+0.82%)` | :arrow_up: |
| [pojo.go](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/283/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.94% <0.00%> (+0.35%)` | :arrow_up: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/283?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/283?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 [a0c5132...041146a](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/283?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] wongoo commented on a change in pull request #283: fixed: #282
Posted by GitBox <gi...@apache.org>.
wongoo commented on a change in pull request #283:
URL: https://github.com/apache/dubbo-go-hessian2/pull/283#discussion_r726692914
##########
File path: encode.go
##########
@@ -19,12 +19,19 @@ package hessian
import (
"reflect"
+ "regexp"
"time"
"unsafe"
+)
+import (
perrors "github.com/pkg/errors"
)
+var (
+ decodeTypeRegexp = regexp.MustCompile(`^(string|u?int(8|16|32|64)?|bool|float(32|64)+)$`)
Review comment:
`float(32|64)+` the plus sign should be removed.
--
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 a change in pull request #283: fixed: #282
Posted by GitBox <gi...@apache.org>.
wongoo commented on a change in pull request #283:
URL: https://github.com/apache/dubbo-go-hessian2/pull/283#discussion_r726689285
##########
File path: encode.go
##########
@@ -19,12 +19,19 @@ package hessian
import (
"reflect"
+ "regexp"
"time"
"unsafe"
+)
+import (
perrors "github.com/pkg/errors"
)
+var (
+ DecodeTypeRegexp = regexp.MustCompile(`^(int(8|16|32|64)?|bool|uint(8|16|32|64)?|float(32|64)+|string)`)
Review comment:
how about change to `^(string|u?int(8|16|32|64)|bool|float(32|64))`
--
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] zouyx merged pull request #283: fix issue #282
Posted by GitBox <gi...@apache.org>.
zouyx merged pull request #283:
URL: https://github.com/apache/dubbo-go-hessian2/pull/283
--
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 #283: fixed: #282
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #283:
URL: https://github.com/apache/dubbo-go-hessian2/pull/283#issuecomment-940578353
# [Codecov](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/283?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 [#283](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/283?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (5bdf65a) into [master](https://codecov.io/gh/apache/dubbo-go-hessian2/commit/a0c5132ce20b13ad397873265fcd28e82ac2c6e6?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (a0c5132) will **decrease** coverage by `0.03%`.
> The diff coverage is `100.00%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/283/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/283?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 #283 +/- ##
==========================================
- Coverage 70.21% 70.17% -0.04%
==========================================
Files 27 27
Lines 3028 3034 +6
==========================================
+ Hits 2126 2129 +3
- Misses 677 678 +1
- Partials 225 227 +2
```
| [Impacted Files](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/283?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [encode.go](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/283/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-ZW5jb2RlLmdv) | `75.00% <100.00%> (-1.86%)` | :arrow_down: |
| [pojo.go](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/283/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.94% <0.00%> (+0.35%)` | :arrow_up: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/283?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/283?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 [a0c5132...5bdf65a](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/283?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] zouyx merged pull request #283: fix issue #282
Posted by GitBox <gi...@apache.org>.
zouyx merged pull request #283:
URL: https://github.com/apache/dubbo-go-hessian2/pull/283
--
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 a change in pull request #283: fixed: #282
Posted by GitBox <gi...@apache.org>.
wongoo commented on a change in pull request #283:
URL: https://github.com/apache/dubbo-go-hessian2/pull/283#discussion_r726690860
##########
File path: encode.go
##########
@@ -155,6 +162,14 @@ func (e *Encoder) Encode(v interface{}) error {
default:
t := UnpackPtrType(reflect.TypeOf(v))
+
+ if DecodeTypeRegexp.Match([]byte(t.String())) { // unpack base type
Review comment:
I think it's better to move the type regex check block as the default switch case, if no kind match then check the regex match.
--
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 #283: fix issue #282
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #283:
URL: https://github.com/apache/dubbo-go-hessian2/pull/283#issuecomment-940578353
--
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 #283: fix issue #282
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #283:
URL: https://github.com/apache/dubbo-go-hessian2/pull/283#issuecomment-940578353
# [Codecov](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/283?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 [#283](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/283?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (b9d8878) into [master](https://codecov.io/gh/apache/dubbo-go-hessian2/commit/a0c5132ce20b13ad397873265fcd28e82ac2c6e6?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (a0c5132) will **decrease** coverage by `0.02%`.
> The diff coverage is `100.00%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/283/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/283?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 #283 +/- ##
==========================================
- Coverage 70.21% 70.19% -0.03%
==========================================
Files 27 27
Lines 3028 3036 +8
==========================================
+ Hits 2126 2131 +5
- Misses 677 678 +1
- Partials 225 227 +2
```
| [Impacted Files](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/283?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [encode.go](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/283/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-ZW5jb2RlLmdv) | `75.43% <100.00%> (-1.42%)` | :arrow_down: |
| [pojo.go](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/283/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.94% <0.00%> (+0.35%)` | :arrow_up: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/283?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/283?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 [a0c5132...b9d8878](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/283?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] wongoo commented on a change in pull request #283: fixed: #282
Posted by GitBox <gi...@apache.org>.
wongoo commented on a change in pull request #283:
URL: https://github.com/apache/dubbo-go-hessian2/pull/283#discussion_r726689523
##########
File path: encode.go
##########
@@ -19,12 +19,19 @@ package hessian
import (
"reflect"
+ "regexp"
"time"
"unsafe"
+)
+import (
perrors "github.com/pkg/errors"
)
+var (
+ DecodeTypeRegexp = regexp.MustCompile(`^(int(8|16|32|64)?|bool|uint(8|16|32|64)?|float(32|64)+|string)`)
Review comment:
`DecodeTypeRegexp` should not be exported
--
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 a change in pull request #283: fix issue #282
Posted by GitBox <gi...@apache.org>.
wongoo commented on a change in pull request #283:
URL: https://github.com/apache/dubbo-go-hessian2/pull/283#discussion_r726697181
##########
File path: encode.go
##########
@@ -155,6 +162,14 @@ func (e *Encoder) Encode(v interface{}) error {
default:
t := UnpackPtrType(reflect.TypeOf(v))
+
+ if DecodeTypeRegexp.Match([]byte(t.String())) { // unpack base type
Review comment:
for most cases, it's a pointer to a struct, not raw types.
--
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