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 2020/12/20 14:46:04 UTC

[GitHub] [dubbo-go-hessian2] AlexStocks opened a new pull request #250: fix lint error in list.go

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


   <!--  Thanks for sending a pull request! 
   -->
   
   **What this PR does**:
   
   fix lint error


----------------------------------------------------------------
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.

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] AlexStocks merged pull request #250: fix lint error

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


   


----------------------------------------------------------------
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.

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] AlexStocks commented on a change in pull request #250: fix lint error

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



##########
File path: list.go
##########
@@ -305,7 +305,7 @@ func (d *Decoder) readTypedList(tag byte) (interface{}, error) {
 
 	isVariableArr := tag == BC_LIST_VARIABLE
 
-	length := -1
+	var length int
 	if listFixedTypedLenTag(tag) {

Review comment:
       望哥 review 过,没问题的。




----------------------------------------------------------------
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.

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-io commented on pull request #250: fix lint error in list.go

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


   # [Codecov](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/250?src=pr&el=h1) Report
   > Merging [#250](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/250?src=pr&el=desc) (20a34e5) into [master](https://codecov.io/gh/apache/dubbo-go-hessian2/commit/05e62bb43806086844aba282b3540ae17cd9d215?el=desc) (05e62bb) will **increase** coverage by `0.01%`.
   > The diff coverage is `100.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/250/graphs/tree.svg?width=650&height=150&src=pr&token=Yh82j7lS1W)](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/250?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master     #250      +/-   ##
   ==========================================
   + Coverage   66.14%   66.15%   +0.01%     
   ==========================================
     Files          25       25              
     Lines        2788     2789       +1     
   ==========================================
   + Hits         1844     1845       +1     
     Misses        716      716              
     Partials      228      228              
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/250?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [list.go](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/250/diff?src=pr&el=tree#diff-bGlzdC5nbw==) | `84.07% <100.00%> (+0.07%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/250?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/250?src=pr&el=footer). Last update [05e62bb...20a34e5](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/250?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
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.

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] AlexStocks commented on a change in pull request #250: fix lint error

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



##########
File path: date.go
##########
@@ -40,8 +40,7 @@ func encDateInMs(b []byte, i interface{}) []byte {
 	value := UnpackPtrValue(reflect.ValueOf(i))
 	vi := value.Interface().(time.Time)
 	if vi == ZeroDate {
-		b = append(b, BC_NULL)
-		return nil
+		return append(b, BC_NULL)
 	}

Review comment:
       @wongoo pls check it again. I am sure it is right.




----------------------------------------------------------------
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.

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-io edited a comment on pull request #250: fix lint error in list.go

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


   # [Codecov](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/250?src=pr&el=h1) Report
   > Merging [#250](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/250?src=pr&el=desc) (cb54fde) into [master](https://codecov.io/gh/apache/dubbo-go-hessian2/commit/05e62bb43806086844aba282b3540ae17cd9d215?el=desc) (05e62bb) will **not change** coverage.
   > The diff coverage is `100.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/250/graphs/tree.svg?width=650&height=150&src=pr&token=Yh82j7lS1W)](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/250?src=pr&el=tree)
   
   ```diff
   @@           Coverage Diff           @@
   ##           master     #250   +/-   ##
   =======================================
     Coverage   66.14%   66.14%           
   =======================================
     Files          25       25           
     Lines        2788     2788           
   =======================================
     Hits         1844     1844           
     Misses        716      716           
     Partials      228      228           
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/250?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [list.go](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/250/diff?src=pr&el=tree#diff-bGlzdC5nbw==) | `84.00% <100.00%> (ø)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/250?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/250?src=pr&el=footer). Last update [05e62bb...cb54fde](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/250?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
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.

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] AlexStocks commented on a change in pull request #250: fix lint error

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



##########
File path: date.go
##########
@@ -40,8 +40,7 @@ func encDateInMs(b []byte, i interface{}) []byte {
 	value := UnpackPtrValue(reflect.ValueOf(i))
 	vi := value.Interface().(time.Time)
 	if vi == ZeroDate {
-		b = append(b, BC_NULL)
-		return nil
+		return append(b, BC_NULL)
 	}

Review comment:
       @wongoo 确认下吧,我确定是对的




----------------------------------------------------------------
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.

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] wenxuwan commented on pull request #250: fix lint error

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


   LGTM


----------------------------------------------------------------
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.

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] hxmhlt commented on a change in pull request #250: fix lint error

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



##########
File path: list.go
##########
@@ -305,7 +305,7 @@ func (d *Decoder) readTypedList(tag byte) (interface{}, error) {
 
 	isVariableArr := tag == BC_LIST_VARIABLE
 
-	length := -1
+	var length int
 	if listFixedTypedLenTag(tag) {

Review comment:
       这个改动会影响下面的使用,确定是对的吗Line 323 Line325

##########
File path: date.go
##########
@@ -40,8 +40,7 @@ func encDateInMs(b []byte, i interface{}) []byte {
 	value := UnpackPtrValue(reflect.ValueOf(i))
 	vi := value.Interface().(time.Time)
 	if vi == ZeroDate {
-		b = append(b, BC_NULL)
-		return nil
+		return append(b, BC_NULL)
 	}

Review comment:
       The return result is changed.  Is it right?




----------------------------------------------------------------
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.

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