AlexStocks commented on code in PR #2480:
URL: https://github.com/apache/dubbo-go/pull/2480#discussion_r1381122679
##########
common/extension/registry_directory.go:
##########
@@ -21,21 +21,41 @@ import (
"dubbo.apache.org/dubbo-go/v3/cluster/directory"
"dubbo.apache.org/dubbo-go/v3/common"
"dubbo.apache.org/dubbo-go/v3/registry"
+ "github.com/dubbogo/gost/log/logger"
)
type registryDirectory func(url *common.URL, registry registry.Registry)
(directory.Directory, error)
-var defaultRegistry registryDirectory
+var directories = make(map[string]registryDirectory)
Review Comment:
连续两个 var,最好写成如下形式:
var (
xx type
xx type
)
##########
common/extension/registry_directory.go:
##########
@@ -21,21 +21,41 @@ import (
"dubbo.apache.org/dubbo-go/v3/cluster/directory"
"dubbo.apache.org/dubbo-go/v3/common"
"dubbo.apache.org/dubbo-go/v3/registry"
+ "github.com/dubbogo/gost/log/logger"
)
type registryDirectory func(url *common.URL, registry registry.Registry)
(directory.Directory, error)
-var defaultRegistry registryDirectory
+var directories = make(map[string]registryDirectory)
Review Comment:
连续两个 var,最好写成如下形式:
var (
xx type
xx type
)
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]