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:03:38 UTC

[GitHub] [dubbo-go] zouyx commented on a change in pull request #530: Add comments for common directory

zouyx commented on a change in pull request #530:
URL: https://github.com/apache/dubbo-go/pull/530#discussion_r429180038



##########
File path: common/config/environment.go
##########
@@ -67,21 +67,22 @@ func NewEnvInstance() {
 //	return env.configCenterFirst
 //}
 
-// UpdateExternalConfigMap ...
+// UpdateExternalConfigMap update env externalConfigMap field
 func (env *Environment) UpdateExternalConfigMap(externalMap map[string]string) {
 	for k, v := range externalMap {
 		env.externalConfigMap.Store(k, v)
 	}
 }
 
-// UpdateAppExternalConfigMap ...
+// UpdateAppExternalConfigMap update env appExternalConfigMap field
 func (env *Environment) UpdateAppExternalConfigMap(externalMap map[string]string) {
 	for k, v := range externalMap {
 		env.appExternalConfigMap.Store(k, v)
 	}
 }
 
-// Configuration ...
+// List represents a doubly linked list.
+// Configuration put externalConfigMap and appExternalConfigMap into list

Review comment:
       ```suggestion
   // Configuration puts externalConfigMap and appExternalConfigMap into list
   // List represents a doubly linked list.
   ```

##########
File path: common/logger/logger.go
##########
@@ -125,18 +125,18 @@ func InitLogger(conf *zap.Config) {
 	getty.SetLogger(logger)
 }
 
-// SetLogger ...
+// SetLogger sets logger for dubbo and getty
 func SetLogger(log Logger) {
 	logger = log
 	getty.SetLogger(logger)
 }
 
-// GetLogger ...
+// GetLogger gets the logger
 func GetLogger() Logger {
 	return logger
 }
 
-// SetLoggerLevel ...
+// SetLoggerLevel used to set logger level

Review comment:
       use for?

##########
File path: common/extension/configurator.go
##########
@@ -61,7 +61,7 @@ func GetDefaultConfigurator(url *common.URL) config_center.Configurator {
 
 }
 
-// GetDefaultConfiguratorFunc ...
+// GetDefaultConfiguratorFunc default configurator function

Review comment:
       ```suggestion
   // GetDefaultConfiguratorFunc gets default configurator function
   ```
   

##########
File path: common/logger/logger.go
##########
@@ -145,13 +145,13 @@ func SetLoggerLevel(level string) bool {
 	return false
 }
 
-// OpsLogger ...
+// OpsLogger used by the SetLoggerLevel

Review comment:
       as above

##########
File path: common/url.go
##########
@@ -432,7 +434,7 @@ func (c URL) GetParamAndDecoded(key string) (string, error) {
 	return value, err
 }
 
-// GetRawParam ...
+// GetRawParam is used to get raw param

Review comment:
       use for?

##########
File path: common/url.go
##########
@@ -452,7 +454,7 @@ func (c URL) GetRawParam(key string) string {
 	}
 }
 
-// GetParamBool ...
+// GetParamBool is used to judge whether key exists or not

Review comment:
       use for?

##########
File path: common/node.go
##########
@@ -17,7 +17,7 @@
 
 package common
 
-// Node ...
+// Node is used to process dubbo node

Review comment:
       as above

##########
File path: common/logger/logger.go
##########
@@ -145,13 +145,13 @@ func SetLoggerLevel(level string) bool {
 	return false
 }
 
-// OpsLogger ...
+// OpsLogger used by the SetLoggerLevel
 type OpsLogger interface {
 	Logger
 	SetLoggerLevel(level string)
 }
 
-// SetLoggerLevel ...
+// SetLoggerLevel used to set logger level

Review comment:
       as above

##########
File path: common/url.go
##########
@@ -86,7 +86,7 @@ type baseUrl struct {
 	PrimitiveURL string
 }
 
-// URL ...
+// URL is used to locate resourse to transfer data between nodes

Review comment:
       use for?




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