-
Notifications
You must be signed in to change notification settings - Fork 929
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add comments for common directory #530
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #530 +/- ##
===========================================
- Coverage 66.56% 66.43% -0.14%
===========================================
Files 184 184
Lines 9706 9706
===========================================
- Hits 6461 6448 -13
- Misses 2604 2616 +12
- Partials 641 642 +1
Continue to review full report at Codecov.
|
common/config/environment.go
Outdated
@@ -46,15 +46,15 @@ var ( | |||
once sync.Once | |||
) | |||
|
|||
// GetEnvInstance ... | |||
// GetEnvInstance get env instance by singleton |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
get -> gets? and the following errors should be fixed too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so, find should be finds, update should be updates and so no
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- use to -> use for?
- get/set -> gets/sets?
common/config/environment.go
Outdated
// List represents a doubly linked list. | ||
// Configuration put externalConfigMap and appExternalConfigMap into list |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// List represents a doubly linked list. | |
// Configuration put externalConfigMap and appExternalConfigMap into list | |
// Configuration puts externalConfigMap and appExternalConfigMap into list | |
// List represents a doubly linked list. |
common/extension/configurator.go
Outdated
@@ -61,7 +61,7 @@ func GetDefaultConfigurator(url *common.URL) config_center.Configurator { | |||
|
|||
} | |||
|
|||
// GetDefaultConfiguratorFunc ... | |||
// GetDefaultConfiguratorFunc default configurator function |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// GetDefaultConfiguratorFunc default configurator function | |
// GetDefaultConfiguratorFunc gets default configurator function |
common/logger/logger.go
Outdated
@@ -145,13 +145,13 @@ func SetLoggerLevel(level string) bool { | |||
return false | |||
} | |||
|
|||
// OpsLogger ... | |||
// OpsLogger used by the SetLoggerLevel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as above
common/logger/logger.go
Outdated
type OpsLogger interface { | ||
Logger | ||
SetLoggerLevel(level string) | ||
} | ||
|
||
// SetLoggerLevel ... | ||
// SetLoggerLevel used to set logger level |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as above
common/node.go
Outdated
@@ -17,7 +17,7 @@ | |||
|
|||
package common | |||
|
|||
// Node ... | |||
// Node is used to process dubbo node |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as above
common/url.go
Outdated
@@ -86,7 +86,7 @@ type baseUrl struct { | |||
PrimitiveURL string | |||
} | |||
|
|||
// URL ... | |||
// URL is used to locate resourse to transfer data between nodes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use for?
common/url.go
Outdated
@@ -452,7 +454,7 @@ func (c URL) GetRawParam(key string) string { | |||
} | |||
} | |||
|
|||
// GetParamBool ... | |||
// GetParamBool is used to judge whether key exists or not |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use for?
common/url.go
Outdated
@@ -432,7 +434,7 @@ func (c URL) GetParamAndDecoded(key string) (string, error) { | |||
return value, err | |||
} | |||
|
|||
// GetRawParam ... | |||
// GetRawParam is used to get raw param |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
please resolve conflicts |
common/config/environment.go
Outdated
@@ -90,17 +91,17 @@ func (env *Environment) Configuration() *list.List { | |||
return cfgList | |||
} | |||
|
|||
// SetDynamicConfiguration ... | |||
// SetDynamicConfiguration is used to set value for dynamicConfiguration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SetDynamicConfiguration sets value for dynamicConfiguration
common/config/environment.go
Outdated
@@ -109,7 +110,7 @@ func newInmemoryConfiguration(p *sync.Map) *InmemoryConfiguration { | |||
return &InmemoryConfiguration{store: p} | |||
} | |||
|
|||
// GetProperty ... | |||
// GetProperty is used the key to get value from InmemoryConfiguration instance |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GetProperty gets value from InmemoryConfiguration instance by @key
common/extension/config_reader.go
Outdated
func GetConfigReaders(name string) interfaces.ConfigReader { | ||
if configReaders[name] == nil { | ||
panic("config reader for " + name + " is not existing, make sure you have imported the package.") | ||
} | ||
return configReaders[name]() | ||
} | ||
|
||
// SetDefaultConfigReader set {name} to default config reader for {module} | ||
// SetDefaultConfigReader sets {name} to default config reader for {module} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's the different {name}
and @name
?
What this PR does:
Add comments
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: