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/06/02 04:52:10 UTC
[GitHub] [dubbo-go] watermelo opened a new pull request #579: Feat: add comments for config
watermelo opened a new pull request #579:
URL: https://github.com/apache/dubbo-go/pull/579
<!-- Thanks for sending a pull request!
-->
**What this PR does**:
Add comments for config
**Which issue(s) this PR fixes**:
<!--
*Automatically closes linked issue when PR is merged.
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
_If PR is about `failing-tests or flakes`, please post the related issues/tests in a comment and do not use `Fixes`_*
-->
Fixes #
**Special notes for your reviewer**:
**Does this PR introduce a user-facing change?**:
<!--
If no, just write "NONE" in the release-note block below.
If yes, a release note is required:
Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required".
-->
```release-note
```
----------------------------------------------------------------
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
[GitHub] [dubbo-go] codecov-commenter edited a comment on pull request #579: Feat: add comments for config
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #579:
URL: https://github.com/apache/dubbo-go/pull/579#issuecomment-637287472
# [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/579?src=pr&el=h1) Report
> Merging [#579](https://codecov.io/gh/apache/dubbo-go/pull/579?src=pr&el=desc) into [develop](https://codecov.io/gh/apache/dubbo-go/commit/4af26b99cdcea223122bec0e90767bd56fad99f8&el=desc) will **decrease** coverage by `0.15%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/dubbo-go/pull/579?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## develop #579 +/- ##
===========================================
- Coverage 66.43% 66.27% -0.16%
===========================================
Files 184 184
Lines 9712 9709 -3
===========================================
- Hits 6452 6435 -17
- Misses 2620 2634 +14
Partials 640 640
```
| [Impacted Files](https://codecov.io/gh/apache/dubbo-go/pull/579?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [config/application\_config.go](https://codecov.io/gh/apache/dubbo-go/pull/579/diff?src=pr&el=tree#diff-Y29uZmlnL2FwcGxpY2F0aW9uX2NvbmZpZy5nbw==) | `55.55% <ø> (+13.88%)` | :arrow_up: |
| [config/base\_config.go](https://codecov.io/gh/apache/dubbo-go/pull/579/diff?src=pr&el=tree#diff-Y29uZmlnL2Jhc2VfY29uZmlnLmdv) | `64.14% <ø> (ø)` | |
| [config/config\_center\_config.go](https://codecov.io/gh/apache/dubbo-go/pull/579/diff?src=pr&el=tree#diff-Y29uZmlnL2NvbmZpZ19jZW50ZXJfY29uZmlnLmdv) | `71.42% <ø> (ø)` | |
| [config/consumer\_config.go](https://codecov.io/gh/apache/dubbo-go/pull/579/diff?src=pr&el=tree#diff-Y29uZmlnL2NvbnN1bWVyX2NvbmZpZy5nbw==) | `56.25% <ø> (ø)` | |
| [config/generic\_service.go](https://codecov.io/gh/apache/dubbo-go/pull/579/diff?src=pr&el=tree#diff-Y29uZmlnL2dlbmVyaWNfc2VydmljZS5nbw==) | `0.00% <ø> (ø)` | |
| [config/graceful\_shutdown.go](https://codecov.io/gh/apache/dubbo-go/pull/579/diff?src=pr&el=tree#diff-Y29uZmlnL2dyYWNlZnVsX3NodXRkb3duLmdv) | `58.62% <ø> (ø)` | |
| [config/graceful\_shutdown\_config.go](https://codecov.io/gh/apache/dubbo-go/pull/579/diff?src=pr&el=tree#diff-Y29uZmlnL2dyYWNlZnVsX3NodXRkb3duX2NvbmZpZy5nbw==) | `100.00% <ø> (ø)` | |
| [config/metadata\_report\_config.go](https://codecov.io/gh/apache/dubbo-go/pull/579/diff?src=pr&el=tree#diff-Y29uZmlnL21ldGFkYXRhX3JlcG9ydF9jb25maWcuZ28=) | `48.71% <ø> (ø)` | |
| [config/method\_config.go](https://codecov.io/gh/apache/dubbo-go/pull/579/diff?src=pr&el=tree#diff-Y29uZmlnL21ldGhvZF9jb25maWcuZ28=) | `54.54% <ø> (ø)` | |
| [config/mock\_rpcservice.go](https://codecov.io/gh/apache/dubbo-go/pull/579/diff?src=pr&el=tree#diff-Y29uZmlnL21vY2tfcnBjc2VydmljZS5nbw==) | `33.33% <ø> (ø)` | |
| ... and [9 more](https://codecov.io/gh/apache/dubbo-go/pull/579/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go/pull/579?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/579?src=pr&el=footer). Last update [4af26b9...da4a02f](https://codecov.io/gh/apache/dubbo-go/pull/579?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
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
[GitHub] [dubbo-go] codecov-commenter edited a comment on pull request #579: Feat: add comments for config
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #579:
URL: https://github.com/apache/dubbo-go/pull/579#issuecomment-637287472
# [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/579?src=pr&el=h1) Report
> Merging [#579](https://codecov.io/gh/apache/dubbo-go/pull/579?src=pr&el=desc) into [develop](https://codecov.io/gh/apache/dubbo-go/commit/4af26b99cdcea223122bec0e90767bd56fad99f8&el=desc) will **increase** coverage by `0.03%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/dubbo-go/pull/579?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## develop #579 +/- ##
===========================================
+ Coverage 66.43% 66.46% +0.03%
===========================================
Files 184 184
Lines 9712 9709 -3
===========================================
+ Hits 6452 6453 +1
+ Misses 2620 2616 -4
Partials 640 640
```
| [Impacted Files](https://codecov.io/gh/apache/dubbo-go/pull/579?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [config/application\_config.go](https://codecov.io/gh/apache/dubbo-go/pull/579/diff?src=pr&el=tree#diff-Y29uZmlnL2FwcGxpY2F0aW9uX2NvbmZpZy5nbw==) | `55.55% <ø> (+13.88%)` | :arrow_up: |
| [config/base\_config.go](https://codecov.io/gh/apache/dubbo-go/pull/579/diff?src=pr&el=tree#diff-Y29uZmlnL2Jhc2VfY29uZmlnLmdv) | `64.14% <ø> (ø)` | |
| [config/config\_center\_config.go](https://codecov.io/gh/apache/dubbo-go/pull/579/diff?src=pr&el=tree#diff-Y29uZmlnL2NvbmZpZ19jZW50ZXJfY29uZmlnLmdv) | `71.42% <ø> (ø)` | |
| [config/consumer\_config.go](https://codecov.io/gh/apache/dubbo-go/pull/579/diff?src=pr&el=tree#diff-Y29uZmlnL2NvbnN1bWVyX2NvbmZpZy5nbw==) | `56.25% <ø> (ø)` | |
| [config/generic\_service.go](https://codecov.io/gh/apache/dubbo-go/pull/579/diff?src=pr&el=tree#diff-Y29uZmlnL2dlbmVyaWNfc2VydmljZS5nbw==) | `0.00% <ø> (ø)` | |
| [config/graceful\_shutdown.go](https://codecov.io/gh/apache/dubbo-go/pull/579/diff?src=pr&el=tree#diff-Y29uZmlnL2dyYWNlZnVsX3NodXRkb3duLmdv) | `58.62% <ø> (ø)` | |
| [config/graceful\_shutdown\_config.go](https://codecov.io/gh/apache/dubbo-go/pull/579/diff?src=pr&el=tree#diff-Y29uZmlnL2dyYWNlZnVsX3NodXRkb3duX2NvbmZpZy5nbw==) | `100.00% <ø> (ø)` | |
| [config/metadata\_report\_config.go](https://codecov.io/gh/apache/dubbo-go/pull/579/diff?src=pr&el=tree#diff-Y29uZmlnL21ldGFkYXRhX3JlcG9ydF9jb25maWcuZ28=) | `48.71% <ø> (ø)` | |
| [config/method\_config.go](https://codecov.io/gh/apache/dubbo-go/pull/579/diff?src=pr&el=tree#diff-Y29uZmlnL21ldGhvZF9jb25maWcuZ28=) | `54.54% <ø> (ø)` | |
| [config/mock\_rpcservice.go](https://codecov.io/gh/apache/dubbo-go/pull/579/diff?src=pr&el=tree#diff-Y29uZmlnL21vY2tfcnBjc2VydmljZS5nbw==) | `33.33% <ø> (ø)` | |
| ... and [8 more](https://codecov.io/gh/apache/dubbo-go/pull/579/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go/pull/579?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/579?src=pr&el=footer). Last update [4af26b9...da4a02f](https://codecov.io/gh/apache/dubbo-go/pull/579?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
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
[GitHub] [dubbo-go] codecov-commenter edited a comment on pull request #579: Feat: add comments for config
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #579:
URL: https://github.com/apache/dubbo-go/pull/579#issuecomment-637287472
# [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/579?src=pr&el=h1) Report
> Merging [#579](https://codecov.io/gh/apache/dubbo-go/pull/579?src=pr&el=desc) into [develop](https://codecov.io/gh/apache/dubbo-go/commit/4af26b99cdcea223122bec0e90767bd56fad99f8&el=desc) will **increase** coverage by `0.03%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/dubbo-go/pull/579?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## develop #579 +/- ##
===========================================
+ Coverage 66.43% 66.46% +0.03%
===========================================
Files 184 184
Lines 9712 9709 -3
===========================================
+ Hits 6452 6453 +1
+ Misses 2620 2616 -4
Partials 640 640
```
| [Impacted Files](https://codecov.io/gh/apache/dubbo-go/pull/579?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [config/application\_config.go](https://codecov.io/gh/apache/dubbo-go/pull/579/diff?src=pr&el=tree#diff-Y29uZmlnL2FwcGxpY2F0aW9uX2NvbmZpZy5nbw==) | `55.55% <ø> (+13.88%)` | :arrow_up: |
| [config/base\_config.go](https://codecov.io/gh/apache/dubbo-go/pull/579/diff?src=pr&el=tree#diff-Y29uZmlnL2Jhc2VfY29uZmlnLmdv) | `64.14% <ø> (ø)` | |
| [config/config\_center\_config.go](https://codecov.io/gh/apache/dubbo-go/pull/579/diff?src=pr&el=tree#diff-Y29uZmlnL2NvbmZpZ19jZW50ZXJfY29uZmlnLmdv) | `71.42% <ø> (ø)` | |
| [config/consumer\_config.go](https://codecov.io/gh/apache/dubbo-go/pull/579/diff?src=pr&el=tree#diff-Y29uZmlnL2NvbnN1bWVyX2NvbmZpZy5nbw==) | `56.25% <ø> (ø)` | |
| [config/generic\_service.go](https://codecov.io/gh/apache/dubbo-go/pull/579/diff?src=pr&el=tree#diff-Y29uZmlnL2dlbmVyaWNfc2VydmljZS5nbw==) | `0.00% <ø> (ø)` | |
| [config/graceful\_shutdown.go](https://codecov.io/gh/apache/dubbo-go/pull/579/diff?src=pr&el=tree#diff-Y29uZmlnL2dyYWNlZnVsX3NodXRkb3duLmdv) | `58.62% <ø> (ø)` | |
| [config/graceful\_shutdown\_config.go](https://codecov.io/gh/apache/dubbo-go/pull/579/diff?src=pr&el=tree#diff-Y29uZmlnL2dyYWNlZnVsX3NodXRkb3duX2NvbmZpZy5nbw==) | `100.00% <ø> (ø)` | |
| [config/metadata\_report\_config.go](https://codecov.io/gh/apache/dubbo-go/pull/579/diff?src=pr&el=tree#diff-Y29uZmlnL21ldGFkYXRhX3JlcG9ydF9jb25maWcuZ28=) | `48.71% <ø> (ø)` | |
| [config/method\_config.go](https://codecov.io/gh/apache/dubbo-go/pull/579/diff?src=pr&el=tree#diff-Y29uZmlnL21ldGhvZF9jb25maWcuZ28=) | `54.54% <ø> (ø)` | |
| [config/mock\_rpcservice.go](https://codecov.io/gh/apache/dubbo-go/pull/579/diff?src=pr&el=tree#diff-Y29uZmlnL21vY2tfcnBjc2VydmljZS5nbw==) | `33.33% <ø> (ø)` | |
| ... and [8 more](https://codecov.io/gh/apache/dubbo-go/pull/579/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go/pull/579?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/579?src=pr&el=footer). Last update [4af26b9...bada632](https://codecov.io/gh/apache/dubbo-go/pull/579?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
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
[GitHub] [dubbo-go] zouyx commented on a change in pull request #579: Feat: add comments for config
Posted by GitBox <gi...@apache.org>.
zouyx commented on a change in pull request #579:
URL: https://github.com/apache/dubbo-go/pull/579#discussion_r433633120
##########
File path: config/interfaces/config_reader.go
##########
@@ -19,7 +19,7 @@ package interfaces
import "bytes"
-// ConfigReader
+// A ConfigReader interface is used to read config from consumer or provider
Review comment:
```suggestion
// ConfigReader is used to read config from consumer or provider
```
##########
File path: config/consumer_config.go
##########
@@ -75,17 +75,17 @@ func (c *ConsumerConfig) UnmarshalYAML(unmarshal func(interface{}) error) error
return nil
}
-// Prefix ...
+// Prefix returns ConsumerConfig prefix
func (*ConsumerConfig) Prefix() string {
return constant.ConsumerConfigPrefix
}
-// SetConsumerConfig ...
+// SetConsumerConfig sets consumerConfig by @c
func SetConsumerConfig(c ConsumerConfig) {
consumerConfig = &c
}
-// ConsumerInit ...
+// ConsumerInit Load config file to init consumer config
Review comment:
```suggestion
// ConsumerInit loads config file to init consumer config
```
##########
File path: config/provider_config.go
##########
@@ -67,17 +67,17 @@ func (c *ProviderConfig) UnmarshalYAML(unmarshal func(interface{}) error) error
return nil
}
-// Prefix ...
+// Prefix returns ProviderConfig prefix
func (*ProviderConfig) Prefix() string {
return constant.ProviderConfigPrefix
}
-// SetProviderConfig ...
+// SetProviderConfig sets provider config by @p
func SetProviderConfig(p ProviderConfig) {
providerConfig = &p
}
-// ProviderInit ...
+// ProviderInit load config file to init provider config
Review comment:
```suggestion
// ProviderInit loads config file to init provider config
```
##########
File path: config/graceful_shutdown.go
##########
@@ -126,10 +126,8 @@ func destroyConsumerProtocols(consumerProtocols *gxset.HashSet) {
}
}
-/**
- * destroy the provider's protocol.
- * if the protocol is consumer's protocol too, we will keep it.
- */
+// destroy the provider's protocol.
Review comment:
```suggestion
// destroyProviderProtocols destroys the provider's protocol.
```
----------------------------------------------------------------
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
[GitHub] [dubbo-go] codecov-commenter commented on pull request #579: Feat: add comments for config
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #579:
URL: https://github.com/apache/dubbo-go/pull/579#issuecomment-637287472
# [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/579?src=pr&el=h1) Report
> Merging [#579](https://codecov.io/gh/apache/dubbo-go/pull/579?src=pr&el=desc) into [develop](https://codecov.io/gh/apache/dubbo-go/commit/4af26b99cdcea223122bec0e90767bd56fad99f8&el=desc) will **decrease** coverage by `0.15%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/dubbo-go/pull/579?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## develop #579 +/- ##
===========================================
- Coverage 66.43% 66.27% -0.16%
===========================================
Files 184 184
Lines 9712 9709 -3
===========================================
- Hits 6452 6435 -17
- Misses 2620 2634 +14
Partials 640 640
```
| [Impacted Files](https://codecov.io/gh/apache/dubbo-go/pull/579?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [config/application\_config.go](https://codecov.io/gh/apache/dubbo-go/pull/579/diff?src=pr&el=tree#diff-Y29uZmlnL2FwcGxpY2F0aW9uX2NvbmZpZy5nbw==) | `55.55% <ø> (+13.88%)` | :arrow_up: |
| [config/base\_config.go](https://codecov.io/gh/apache/dubbo-go/pull/579/diff?src=pr&el=tree#diff-Y29uZmlnL2Jhc2VfY29uZmlnLmdv) | `64.14% <ø> (ø)` | |
| [config/config\_center\_config.go](https://codecov.io/gh/apache/dubbo-go/pull/579/diff?src=pr&el=tree#diff-Y29uZmlnL2NvbmZpZ19jZW50ZXJfY29uZmlnLmdv) | `71.42% <ø> (ø)` | |
| [config/consumer\_config.go](https://codecov.io/gh/apache/dubbo-go/pull/579/diff?src=pr&el=tree#diff-Y29uZmlnL2NvbnN1bWVyX2NvbmZpZy5nbw==) | `56.25% <ø> (ø)` | |
| [config/generic\_service.go](https://codecov.io/gh/apache/dubbo-go/pull/579/diff?src=pr&el=tree#diff-Y29uZmlnL2dlbmVyaWNfc2VydmljZS5nbw==) | `0.00% <ø> (ø)` | |
| [config/graceful\_shutdown.go](https://codecov.io/gh/apache/dubbo-go/pull/579/diff?src=pr&el=tree#diff-Y29uZmlnL2dyYWNlZnVsX3NodXRkb3duLmdv) | `58.62% <ø> (ø)` | |
| [config/graceful\_shutdown\_config.go](https://codecov.io/gh/apache/dubbo-go/pull/579/diff?src=pr&el=tree#diff-Y29uZmlnL2dyYWNlZnVsX3NodXRkb3duX2NvbmZpZy5nbw==) | `100.00% <ø> (ø)` | |
| [config/metadata\_report\_config.go](https://codecov.io/gh/apache/dubbo-go/pull/579/diff?src=pr&el=tree#diff-Y29uZmlnL21ldGFkYXRhX3JlcG9ydF9jb25maWcuZ28=) | `48.71% <ø> (ø)` | |
| [config/method\_config.go](https://codecov.io/gh/apache/dubbo-go/pull/579/diff?src=pr&el=tree#diff-Y29uZmlnL21ldGhvZF9jb25maWcuZ28=) | `54.54% <ø> (ø)` | |
| [config/mock\_rpcservice.go](https://codecov.io/gh/apache/dubbo-go/pull/579/diff?src=pr&el=tree#diff-Y29uZmlnL21vY2tfcnBjc2VydmljZS5nbw==) | `33.33% <ø> (ø)` | |
| ... and [9 more](https://codecov.io/gh/apache/dubbo-go/pull/579/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go/pull/579?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/579?src=pr&el=footer). Last update [4af26b9...b8502aa](https://codecov.io/gh/apache/dubbo-go/pull/579?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
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
[GitHub] [dubbo-go] AlexStocks commented on pull request #579: Feat: add comments for config
Posted by GitBox <gi...@apache.org>.
AlexStocks commented on pull request #579:
URL: https://github.com/apache/dubbo-go/pull/579#issuecomment-637533703
LGTM
----------------------------------------------------------------
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
[GitHub] [dubbo-go] zouyx commented on a change in pull request #579: Feat: add comments for config
Posted by GitBox <gi...@apache.org>.
zouyx commented on a change in pull request #579:
URL: https://github.com/apache/dubbo-go/pull/579#discussion_r433889968
##########
File path: config/registry_config.go
##########
@@ -47,7 +47,7 @@ type RegistryConfig struct {
Params map[string]string `yaml:"params" json:"params,omitempty" property:"params"`
}
-// UnmarshalYAML ...
+// UnmarshalYAML unmarshal the RegistryConfig by @unmarshal function
Review comment:
```suggestion
// UnmarshalYAML unmarshals the RegistryConfig by @unmarshal function
```
##########
File path: config/consumer_config.go
##########
@@ -63,7 +63,7 @@ type ConsumerConfig struct {
ConfigType map[string]string `yaml:"config_type" json:"config_type,omitempty" property:"config_type"`
}
-// UnmarshalYAML ...
+// UnmarshalYAML unmarshal the ConsumerConfig by @unmarshal function
Review comment:
```suggestion
// UnmarshalYAML unmarshals the ConsumerConfig by @unmarshal function
```
##########
File path: config/reference_config.go
##########
@@ -76,7 +76,7 @@ func NewReferenceConfig(id string, ctx context.Context) *ReferenceConfig {
return &ReferenceConfig{id: id, context: ctx}
}
-// UnmarshalYAML ...
+// UnmarshalYAML unmarshal the ReferenceConfig by @unmarshal function
Review comment:
```suggestion
// UnmarshalYAML unmarshals the ReferenceConfig by @unmarshal function
```
----------------------------------------------------------------
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
[GitHub] [dubbo-go] AlexStocks commented on a change in pull request #579: Feat: add comments for config
Posted by GitBox <gi...@apache.org>.
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go] codecov-commenter edited a comment on pull request #579: Feat: add comments for config
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #579:
URL: https://github.com/apache/dubbo-go/pull/579#issuecomment-637287472
# [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/579?src=pr&el=h1) Report
> Merging [#579](https://codecov.io/gh/apache/dubbo-go/pull/579?src=pr&el=desc) into [develop](https://codecov.io/gh/apache/dubbo-go/commit/4af26b99cdcea223122bec0e90767bd56fad99f8&el=desc) will **increase** coverage by `0.09%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/dubbo-go/pull/579?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## develop #579 +/- ##
===========================================
+ Coverage 66.43% 66.52% +0.09%
===========================================
Files 184 184
Lines 9712 9709 -3
===========================================
+ Hits 6452 6459 +7
+ Misses 2620 2606 -14
- Partials 640 644 +4
```
| [Impacted Files](https://codecov.io/gh/apache/dubbo-go/pull/579?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [config/application\_config.go](https://codecov.io/gh/apache/dubbo-go/pull/579/diff?src=pr&el=tree#diff-Y29uZmlnL2FwcGxpY2F0aW9uX2NvbmZpZy5nbw==) | `55.55% <ø> (+13.88%)` | :arrow_up: |
| [config/base\_config.go](https://codecov.io/gh/apache/dubbo-go/pull/579/diff?src=pr&el=tree#diff-Y29uZmlnL2Jhc2VfY29uZmlnLmdv) | `64.14% <ø> (ø)` | |
| [config/config\_center\_config.go](https://codecov.io/gh/apache/dubbo-go/pull/579/diff?src=pr&el=tree#diff-Y29uZmlnL2NvbmZpZ19jZW50ZXJfY29uZmlnLmdv) | `71.42% <ø> (ø)` | |
| [config/consumer\_config.go](https://codecov.io/gh/apache/dubbo-go/pull/579/diff?src=pr&el=tree#diff-Y29uZmlnL2NvbnN1bWVyX2NvbmZpZy5nbw==) | `56.25% <ø> (ø)` | |
| [config/generic\_service.go](https://codecov.io/gh/apache/dubbo-go/pull/579/diff?src=pr&el=tree#diff-Y29uZmlnL2dlbmVyaWNfc2VydmljZS5nbw==) | `0.00% <ø> (ø)` | |
| [config/graceful\_shutdown.go](https://codecov.io/gh/apache/dubbo-go/pull/579/diff?src=pr&el=tree#diff-Y29uZmlnL2dyYWNlZnVsX3NodXRkb3duLmdv) | `58.62% <ø> (ø)` | |
| [config/graceful\_shutdown\_config.go](https://codecov.io/gh/apache/dubbo-go/pull/579/diff?src=pr&el=tree#diff-Y29uZmlnL2dyYWNlZnVsX3NodXRkb3duX2NvbmZpZy5nbw==) | `100.00% <ø> (ø)` | |
| [config/metadata\_report\_config.go](https://codecov.io/gh/apache/dubbo-go/pull/579/diff?src=pr&el=tree#diff-Y29uZmlnL21ldGFkYXRhX3JlcG9ydF9jb25maWcuZ28=) | `48.71% <ø> (ø)` | |
| [config/method\_config.go](https://codecov.io/gh/apache/dubbo-go/pull/579/diff?src=pr&el=tree#diff-Y29uZmlnL21ldGhvZF9jb25maWcuZ28=) | `54.54% <ø> (ø)` | |
| [config/mock\_rpcservice.go](https://codecov.io/gh/apache/dubbo-go/pull/579/diff?src=pr&el=tree#diff-Y29uZmlnL21vY2tfcnBjc2VydmljZS5nbw==) | `33.33% <ø> (ø)` | |
| ... and [10 more](https://codecov.io/gh/apache/dubbo-go/pull/579/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go/pull/579?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/579?src=pr&el=footer). Last update [4af26b9...bada632](https://codecov.io/gh/apache/dubbo-go/pull/579?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
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
[GitHub] [dubbo-go] watermelo commented on pull request #579: Feat: add comments for config
Posted by GitBox <gi...@apache.org>.
watermelo commented on pull request #579:
URL: https://github.com/apache/dubbo-go/pull/579#issuecomment-637271188
#566
----------------------------------------------------------------
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
[GitHub] [dubbo-go] Patrick0308 commented on a change in pull request #579: Feat: add comments for config
Posted by GitBox <gi...@apache.org>.
Patrick0308 commented on a change in pull request #579:
URL: https://github.com/apache/dubbo-go/pull/579#discussion_r433853168
##########
File path: config/config_center_config.go
##########
@@ -31,7 +31,13 @@ import (
"github.com/apache/dubbo-go/common/constant"
)
-// ConfigCenterConfig ...
+// ConfigCenterConfig is configuration for config center
+//
+// ConfigCenter also introduced concepts of namespace and group to better manage Key-Value pairs by group,
+// those concepts are already built-in in many professional third-party configuration centers.
+// In most cases, namespace is used to isolate different tetants, while group is used to divid the key set from one tetant into groups.
Review comment:
```suggestion
// Those configs are already built-in in many professional third-party configuration centers.
// In most cases, namespace is used to isolate different tenants, while group is used to divide the key set from one tenant into groups.
```
----------------------------------------------------------------
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
[GitHub] [dubbo-go] Patrick0308 merged pull request #579: Feat: add comments for config
Posted by GitBox <gi...@apache.org>.
Patrick0308 merged pull request #579:
URL: https://github.com/apache/dubbo-go/pull/579
----------------------------------------------------------------
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