AlexStocks commented on a change in pull request #579: URL: https://github.com/apache/dubbo-go/pull/579#discussion_r433790438
########## File path: config/graceful_shutdown_config.go ########## @@ -31,7 +31,7 @@ const ( defaultStepTimeout = 10 * time.Second ) -// ShutdownConfig ... +// ShutdownConfig is configuration for graceful shutdown Review comment: ShutdownConfig is used as configuration for graceful shutdown ########## File path: config/method_config.go ########## @@ -42,7 +42,7 @@ type MethodConfig struct { RequestTimeout string `yaml:"timeout" json:"timeout,omitempty" property:"timeout"` } -// Prefix ... +// Prefix returns MethodConfig prefix Review comment: // nolint ########## File path: config/method_config.go ########## @@ -51,7 +51,7 @@ func (c *MethodConfig) Prefix() string { return constant.DUBBO + "." + c.InterfaceName + "." + c.Name + "." } -// UnmarshalYAML ... +// UnmarshalYAML unmarshal the MethodConfig by @unmarshal function Review comment: // nolint ########## File path: config/graceful_shutdown_config.go ########## @@ -58,12 +58,12 @@ type ShutdownConfig struct { RequestsFinished bool } -// Prefix ... +// Prefix returns ShutdownConfig prefix Review comment: // nolint ########## File path: config/graceful_shutdown_config.go ########## @@ -74,7 +74,7 @@ func (config *ShutdownConfig) GetTimeout() time.Duration { return result } -// GetStepTimeout ... +// GetStepTimeout gets StepTimeout in ShutdownConfig Review comment: // nolint ########## File path: config/application_config.go ########## @@ -36,22 +36,12 @@ type ApplicationConfig struct { MetadataType string `default:"local" yaml:"metadataType" json:"metadataType,omitempty" property:"metadataType"` //field for metadata report } -// Prefix ... +// Prefix returns ApplicationConfig prefix func (*ApplicationConfig) Prefix() string { return constant.DUBBO + ".application." } -// Id ... -func (c *ApplicationConfig) Id() string { - return "" -} - -// SetId ... -func (c *ApplicationConfig) SetId(id string) { - -} - -// UnmarshalYAML ... +// UnmarshalYAML unmarshal the ApplicationConfig by @unmarshal function Review comment: unmarshal --> unmarshals ########## File path: config/config_center_config.go ########## @@ -48,7 +54,7 @@ type ConfigCenterConfig struct { timeout time.Duration } -// UnmarshalYAML ... +// UnmarshalYAML unmarshal the ConfigCenterConfig by @unmarshal function Review comment: unmarshal --> unmarshals ########## File path: config/base_config.go ########## @@ -68,8 +68,8 @@ func (c *BaseConfig) startConfigCenter() error { return err } +// prepareEnvironment prepare the environment Review comment: firstly, u need not add comment for private funcs. ########## File path: config/graceful_shutdown.go ########## @@ -52,7 +52,7 @@ import ( * We define them by using 'package build' feature https://golang.org/pkg/go/build/ */ -// GracefulShutdownInit ... +// GracefulShutdownInit init for graceful shutdown Review comment: the func name is very clearly. So the comment is useless. u can add comment as follows, ```Go // nolint ``` ########## File path: config/graceful_shutdown_config.go ########## @@ -58,12 +58,12 @@ type ShutdownConfig struct { RequestsFinished bool } -// Prefix ... +// Prefix returns ShutdownConfig prefix func (config *ShutdownConfig) Prefix() string { return constant.ShutdownConfigPrefix } -// GetTimeout ... +// GetTimeout gets timeout in ShutdownConfig Review comment: // nolint ########## File path: config/metadata_report_config.go ########## @@ -43,12 +43,12 @@ type MetadataReportConfig struct { Group string `yaml:"group" json:"group,omitempty" property:"group"` } -// Prefix ... +// Prefix returns MetadataReportConfig prefix func (c *MetadataReportConfig) Prefix() string { return constant.MetadataReportPrefix } -// UnmarshalYAML ... +// UnmarshalYAML unmarshal the MetadataReportConfig by @unmarshal function Review comment: unmarshal -> unmarshals ########## File path: config/provider_config.go ########## @@ -55,7 +55,7 @@ type ProviderConfig struct { ConfigType map[string]string `yaml:"config_type" json:"config_type,omitempty" property:"config_type"` } -// UnmarshalYAML ... +// UnmarshalYAML unmarshal the ProviderConfig by @unmarshal function Review comment: unmarshal -> unmarshals ########## File path: config/metadata_report_config.go ########## @@ -60,7 +60,7 @@ func (c *MetadataReportConfig) UnmarshalYAML(unmarshal func(interface{}) error) return nil } -// ToUrl ... +// ToUrl transforms MetadataReportConfig to url Review comment: // nolint ########## File path: config/service_config.go ########## @@ -80,12 +80,12 @@ type ServiceConfig struct { cacheMutex sync.Mutex } -// Prefix ... +// Prefix returns ServiceConfig prefix func (c *ServiceConfig) Prefix() string { return constant.ServiceConfigPrefix + c.InterfaceName + "." } -// UnmarshalYAML ... +// UnmarshalYAML unmarshal the ServiceConfig by @unmarshal function Review comment: unmarshal -> unmarshals ---------------------------------------------------------------- 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: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@dubbo.apache.org For additional commands, e-mail: notifications-h...@dubbo.apache.org