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/05/22 11:32:30 UTC

[GitHub] [dubbo-go] georgehao commented on a change in pull request #529: Fix: gitee code analysis shadow err

georgehao commented on a change in pull request #529:
URL: https://github.com/apache/dubbo-go/pull/529#discussion_r429194389



##########
File path: cluster/directory/static_directory.go
##########
@@ -61,7 +61,7 @@ func (dir *staticDirectory) IsAvailable() bool {
 // List List invokers
 func (dir *staticDirectory) List(invocation protocol.Invocation) []protocol.Invoker {
 	l := len(dir.invokers)
-	invokers := make([]protocol.Invoker, l, l)
+	invokers := make([]protocol.Invoker, l)

Review comment:
       gosamle detect it. I also think the `capactity` no useful
   ```
   static_directory.go:64:39: S1019: should use make([]protocol.Invoker, l) instead (gosimple)
   invokers := make([]protocol.Invoker, l, l)
   	                                     ^
   ```




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