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/12/12 15:00:36 UTC

[GitHub] [dubbo-go] cityiron opened a new pull request #932: [Fix] file service discovery path can run in windows

cityiron opened a new pull request #932:
URL: https://github.com/apache/dubbo-go/pull/932


   <!--  Thanks for sending a pull request!
   Read https://github.com/apache/dubbo-go/blob/master/contributing.md before commit pull request. 
   -->
   
   **What this PR does**:
   Windows run fail because the path is "/" and the filename contains "." or ":" ..., I use filePath replace path, replace some special character.
   
   **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-io edited a comment on pull request #932: [Fix] file service discovery path can run in windows

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #932:
URL: https://github.com/apache/dubbo-go/pull/932#issuecomment-743769608


   # [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/932?src=pr&el=h1) Report
   > Merging [#932](https://codecov.io/gh/apache/dubbo-go/pull/932?src=pr&el=desc) (cc7fb2e) into [develop](https://codecov.io/gh/apache/dubbo-go/commit/1f708d7cb6c5eff076c64982d33275f762e25b60?el=desc) (1f708d7) will **decrease** coverage by `0.07%`.
   > The diff coverage is `48.57%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go/pull/932/graphs/tree.svg?width=650&height=150&src=pr&token=dcPE6RyFAL)](https://codecov.io/gh/apache/dubbo-go/pull/932?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff             @@
   ##           develop     #932      +/-   ##
   ===========================================
   - Coverage    59.95%   59.87%   -0.08%     
   ===========================================
     Files          260      261       +1     
     Lines        12855    12937      +82     
   ===========================================
   + Hits          7707     7746      +39     
   - Misses        4188     4233      +45     
   + Partials       960      958       -2     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go/pull/932?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [config\_center/file/impl.go](https://codecov.io/gh/apache/dubbo-go/pull/932/diff?src=pr&el=tree#diff-Y29uZmlnX2NlbnRlci9maWxlL2ltcGwuZ28=) | `50.40% <47.05%> (-2.07%)` | :arrow_down: |
   | [registry/file/service\_discovery.go](https://codecov.io/gh/apache/dubbo-go/pull/932/diff?src=pr&el=tree#diff-cmVnaXN0cnkvZmlsZS9zZXJ2aWNlX2Rpc2NvdmVyeS5nbw==) | `45.74% <100.00%> (ø)` | |
   | [metadata/definition/mock.go](https://codecov.io/gh/apache/dubbo-go/pull/932/diff?src=pr&el=tree#diff-bWV0YWRhdGEvZGVmaW5pdGlvbi9tb2NrLmdv) | `0.00% <0.00%> (-25.00%)` | :arrow_down: |
   | [config/config\_loader.go](https://codecov.io/gh/apache/dubbo-go/pull/932/diff?src=pr&el=tree#diff-Y29uZmlnL2NvbmZpZ19sb2FkZXIuZ28=) | `40.95% <0.00%> (-12.77%)` | :arrow_down: |
   | [config/service\_config.go](https://codecov.io/gh/apache/dubbo-go/pull/932/diff?src=pr&el=tree#diff-Y29uZmlnL3NlcnZpY2VfY29uZmlnLmdv) | `55.03% <0.00%> (-7.65%)` | :arrow_down: |
   | [cluster/router/chain/chain.go](https://codecov.io/gh/apache/dubbo-go/pull/932/diff?src=pr&el=tree#diff-Y2x1c3Rlci9yb3V0ZXIvY2hhaW4vY2hhaW4uZ28=) | `69.04% <0.00%> (-1.59%)` | :arrow_down: |
   | [remoting/getty/pool.go](https://codecov.io/gh/apache/dubbo-go/pull/932/diff?src=pr&el=tree#diff-cmVtb3RpbmcvZ2V0dHkvcG9vbC5nbw==) | `68.72% <0.00%> (-0.89%)` | :arrow_down: |
   | [registry/protocol/protocol.go](https://codecov.io/gh/apache/dubbo-go/pull/932/diff?src=pr&el=tree#diff-cmVnaXN0cnkvcHJvdG9jb2wvcHJvdG9jb2wuZ28=) | `76.96% <0.00%> (-0.88%)` | :arrow_down: |
   | [common/proxy/proxy.go](https://codecov.io/gh/apache/dubbo-go/pull/932/diff?src=pr&el=tree#diff-Y29tbW9uL3Byb3h5L3Byb3h5Lmdv) | `88.46% <0.00%> (-0.86%)` | :arrow_down: |
   | [registry/nacos/service\_discovery.go](https://codecov.io/gh/apache/dubbo-go/pull/932/diff?src=pr&el=tree#diff-cmVnaXN0cnkvbmFjb3Mvc2VydmljZV9kaXNjb3ZlcnkuZ28=) | `64.13% <0.00%> (-0.45%)` | :arrow_down: |
   | ... and [23 more](https://codecov.io/gh/apache/dubbo-go/pull/932/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go/pull/932?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/932?src=pr&el=footer). Last update [1f708d7...cc7fb2e](https://codecov.io/gh/apache/dubbo-go/pull/932?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-io edited a comment on pull request #932: [Fix] file service discovery path can run in windows

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #932:
URL: https://github.com/apache/dubbo-go/pull/932#issuecomment-743769608


   # [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/932?src=pr&el=h1) Report
   > Merging [#932](https://codecov.io/gh/apache/dubbo-go/pull/932?src=pr&el=desc) (837cda3) into [develop](https://codecov.io/gh/apache/dubbo-go/commit/6108b0bec43b5ca4bd36ac79a26b568d90ba832d?el=desc) (6108b0b) will **increase** coverage by `0.02%`.
   > The diff coverage is `51.35%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go/pull/932/graphs/tree.svg?width=650&height=150&src=pr&token=dcPE6RyFAL)](https://codecov.io/gh/apache/dubbo-go/pull/932?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff             @@
   ##           develop     #932      +/-   ##
   ===========================================
   + Coverage    59.89%   59.92%   +0.02%     
   ===========================================
     Files          260      260              
     Lines        12852    12878      +26     
   ===========================================
   + Hits          7698     7717      +19     
     Misses        4192     4192              
   - Partials       962      969       +7     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go/pull/932?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [config\_center/file/impl.go](https://codecov.io/gh/apache/dubbo-go/pull/932/diff?src=pr&el=tree#diff-Y29uZmlnX2NlbnRlci9maWxlL2ltcGwuZ28=) | `51.20% <50.00%> (-1.28%)` | :arrow_down: |
   | [registry/file/service\_discovery.go](https://codecov.io/gh/apache/dubbo-go/pull/932/diff?src=pr&el=tree#diff-cmVnaXN0cnkvZmlsZS9zZXJ2aWNlX2Rpc2NvdmVyeS5nbw==) | `45.74% <100.00%> (ø)` | |
   | [remoting/kubernetes/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/932/diff?src=pr&el=tree#diff-cmVtb3Rpbmcva3ViZXJuZXRlcy9saXN0ZW5lci5nbw==) | `50.52% <0.00%> (-3.16%)` | :arrow_down: |
   | [cluster/cluster\_impl/failback\_cluster\_invoker.go](https://codecov.io/gh/apache/dubbo-go/pull/932/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvZmFpbGJhY2tfY2x1c3Rlcl9pbnZva2VyLmdv) | `75.90% <0.00%> (-2.41%)` | :arrow_down: |
   | [registry/zookeeper/registry.go](https://codecov.io/gh/apache/dubbo-go/pull/932/diff?src=pr&el=tree#diff-cmVnaXN0cnkvem9va2VlcGVyL3JlZ2lzdHJ5Lmdv) | `50.36% <0.00%> (-0.75%)` | :arrow_down: |
   | [remoting/getty/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/932/diff?src=pr&el=tree#diff-cmVtb3RpbmcvZ2V0dHkvbGlzdGVuZXIuZ28=) | `41.62% <0.00%> (+0.54%)` | :arrow_up: |
   | [remoting/getty/pool.go](https://codecov.io/gh/apache/dubbo-go/pull/932/diff?src=pr&el=tree#diff-cmVtb3RpbmcvZ2V0dHkvcG9vbC5nbw==) | `71.36% <0.00%> (+1.76%)` | :arrow_up: |
   | [registry/kubernetes/registry.go](https://codecov.io/gh/apache/dubbo-go/pull/932/diff?src=pr&el=tree#diff-cmVnaXN0cnkva3ViZXJuZXRlcy9yZWdpc3RyeS5nbw==) | `60.86% <0.00%> (+8.69%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go/pull/932?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/932?src=pr&el=footer). Last update [6108b0b...837cda3](https://codecov.io/gh/apache/dubbo-go/pull/932?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-io commented on pull request #932: [Fix] file service discovery path can run in windows

Posted by GitBox <gi...@apache.org>.
codecov-io commented on pull request #932:
URL: https://github.com/apache/dubbo-go/pull/932#issuecomment-743769608


   # [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/932?src=pr&el=h1) Report
   > Merging [#932](https://codecov.io/gh/apache/dubbo-go/pull/932?src=pr&el=desc) (837cda3) into [develop](https://codecov.io/gh/apache/dubbo-go/commit/6108b0bec43b5ca4bd36ac79a26b568d90ba832d?el=desc) (6108b0b) will **decrease** coverage by `0.13%`.
   > The diff coverage is `51.35%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go/pull/932/graphs/tree.svg?width=650&height=150&src=pr&token=dcPE6RyFAL)](https://codecov.io/gh/apache/dubbo-go/pull/932?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff             @@
   ##           develop     #932      +/-   ##
   ===========================================
   - Coverage    59.89%   59.76%   -0.14%     
   ===========================================
     Files          260      260              
     Lines        12852    12878      +26     
   ===========================================
   - Hits          7698     7696       -2     
   - Misses        4192     4214      +22     
   - Partials       962      968       +6     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go/pull/932?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [config\_center/file/impl.go](https://codecov.io/gh/apache/dubbo-go/pull/932/diff?src=pr&el=tree#diff-Y29uZmlnX2NlbnRlci9maWxlL2ltcGwuZ28=) | `51.20% <50.00%> (-1.28%)` | :arrow_down: |
   | [registry/file/service\_discovery.go](https://codecov.io/gh/apache/dubbo-go/pull/932/diff?src=pr&el=tree#diff-cmVnaXN0cnkvZmlsZS9zZXJ2aWNlX2Rpc2NvdmVyeS5nbw==) | `45.74% <100.00%> (ø)` | |
   | [metadata/report/delegate/delegate\_report.go](https://codecov.io/gh/apache/dubbo-go/pull/932/diff?src=pr&el=tree#diff-bWV0YWRhdGEvcmVwb3J0L2RlbGVnYXRlL2RlbGVnYXRlX3JlcG9ydC5nbw==) | `29.66% <0.00%> (-10.17%)` | :arrow_down: |
   | [...tocol/rest/server/server\_impl/go\_restful\_server.go](https://codecov.io/gh/apache/dubbo-go/pull/932/diff?src=pr&el=tree#diff-cHJvdG9jb2wvcmVzdC9zZXJ2ZXIvc2VydmVyX2ltcGwvZ29fcmVzdGZ1bF9zZXJ2ZXIuZ28=) | `43.90% <0.00%> (-4.88%)` | :arrow_down: |
   | [remoting/kubernetes/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/932/diff?src=pr&el=tree#diff-cmVtb3Rpbmcva3ViZXJuZXRlcy9saXN0ZW5lci5nbw==) | `50.52% <0.00%> (-3.16%)` | :arrow_down: |
   | [cluster/cluster\_impl/failback\_cluster\_invoker.go](https://codecov.io/gh/apache/dubbo-go/pull/932/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvZmFpbGJhY2tfY2x1c3Rlcl9pbnZva2VyLmdv) | `75.90% <0.00%> (-2.41%)` | :arrow_down: |
   | [remoting/getty/pool.go](https://codecov.io/gh/apache/dubbo-go/pull/932/diff?src=pr&el=tree#diff-cmVtb3RpbmcvZ2V0dHkvcG9vbC5nbw==) | `68.72% <0.00%> (-0.89%)` | :arrow_down: |
   | [registry/zookeeper/registry.go](https://codecov.io/gh/apache/dubbo-go/pull/932/diff?src=pr&el=tree#diff-cmVnaXN0cnkvem9va2VlcGVyL3JlZ2lzdHJ5Lmdv) | `50.36% <0.00%> (-0.75%)` | :arrow_down: |
   | [registry/kubernetes/registry.go](https://codecov.io/gh/apache/dubbo-go/pull/932/diff?src=pr&el=tree#diff-cmVnaXN0cnkva3ViZXJuZXRlcy9yZWdpc3RyeS5nbw==) | `60.86% <0.00%> (+8.69%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go/pull/932?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/932?src=pr&el=footer). Last update [6108b0b...837cda3](https://codecov.io/gh/apache/dubbo-go/pull/932?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-io edited a comment on pull request #932: [Fix] file service discovery path can run in windows

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #932:
URL: https://github.com/apache/dubbo-go/pull/932#issuecomment-743769608


   # [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/932?src=pr&el=h1) Report
   > Merging [#932](https://codecov.io/gh/apache/dubbo-go/pull/932?src=pr&el=desc) (55e861a) into [develop](https://codecov.io/gh/apache/dubbo-go/commit/1f708d7cb6c5eff076c64982d33275f762e25b60?el=desc) (1f708d7) will **decrease** coverage by `0.20%`.
   > The diff coverage is `48.57%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go/pull/932/graphs/tree.svg?width=650&height=150&src=pr&token=dcPE6RyFAL)](https://codecov.io/gh/apache/dubbo-go/pull/932?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff             @@
   ##           develop     #932      +/-   ##
   ===========================================
   - Coverage    59.95%   59.74%   -0.21%     
   ===========================================
     Files          260      260              
     Lines        12855    12877      +22     
   ===========================================
   - Hits          7707     7694      -13     
   - Misses        4188     4217      +29     
   - Partials       960      966       +6     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go/pull/932?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [config\_center/file/impl.go](https://codecov.io/gh/apache/dubbo-go/pull/932/diff?src=pr&el=tree#diff-Y29uZmlnX2NlbnRlci9maWxlL2ltcGwuZ28=) | `50.40% <47.05%> (-2.07%)` | :arrow_down: |
   | [registry/file/service\_discovery.go](https://codecov.io/gh/apache/dubbo-go/pull/932/diff?src=pr&el=tree#diff-cmVnaXN0cnkvZmlsZS9zZXJ2aWNlX2Rpc2NvdmVyeS5nbw==) | `45.74% <100.00%> (ø)` | |
   | [registry/kubernetes/registry.go](https://codecov.io/gh/apache/dubbo-go/pull/932/diff?src=pr&el=tree#diff-cmVnaXN0cnkva3ViZXJuZXRlcy9yZWdpc3RyeS5nbw==) | `52.17% <0.00%> (-8.70%)` | :arrow_down: |
   | [cluster/cluster\_impl/base\_cluster\_invoker.go](https://codecov.io/gh/apache/dubbo-go/pull/932/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvYmFzZV9jbHVzdGVyX2ludm9rZXIuZ28=) | `52.77% <0.00%> (-8.34%)` | :arrow_down: |
   | [...tocol/rest/server/server\_impl/go\_restful\_server.go](https://codecov.io/gh/apache/dubbo-go/pull/932/diff?src=pr&el=tree#diff-cHJvdG9jb2wvcmVzdC9zZXJ2ZXIvc2VydmVyX2ltcGwvZ29fcmVzdGZ1bF9zZXJ2ZXIuZ28=) | `43.90% <0.00%> (-4.88%)` | :arrow_down: |
   | [cluster/router/chain/chain.go](https://codecov.io/gh/apache/dubbo-go/pull/932/diff?src=pr&el=tree#diff-Y2x1c3Rlci9yb3V0ZXIvY2hhaW4vY2hhaW4uZ28=) | `67.46% <0.00%> (-3.18%)` | :arrow_down: |
   | [remoting/getty/pool.go](https://codecov.io/gh/apache/dubbo-go/pull/932/diff?src=pr&el=tree#diff-cmVtb3RpbmcvZ2V0dHkvcG9vbC5nbw==) | `68.72% <0.00%> (-0.89%)` | :arrow_down: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go/pull/932?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/932?src=pr&el=footer). Last update [1f708d7...55e861a](https://codecov.io/gh/apache/dubbo-go/pull/932?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] cityiron commented on pull request #932: [Fix] file service discovery path can run in windows

Posted by GitBox <gi...@apache.org>.
cityiron commented on pull request #932:
URL: https://github.com/apache/dubbo-go/pull/932#issuecomment-744299976


   张训 help test in windows successful.


----------------------------------------------------------------
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 #932: [Fix] file service discovery path can run in windows

Posted by GitBox <gi...@apache.org>.
zouyx commented on a change in pull request #932:
URL: https://github.com/apache/dubbo-go/pull/932#discussion_r541933318



##########
File path: config_center/file/impl.go
##########
@@ -41,13 +40,29 @@ import (
 	"github.com/apache/dubbo-go/config_center/parser"
 )
 
+var osType string
+var path string
+
 const (
-	PARAM_NAME_PREFIX                 = "dubbo.config-center."
-	CONFIG_CENTER_DIR_PARAM_NAME      = PARAM_NAME_PREFIX + "dir"
-	CONFIG_CENTER_ENCODING_PARAM_NAME = PARAM_NAME_PREFIX + "encoding"
-	DEFAULT_CONFIG_CENTER_ENCODING    = "UTF-8"
+	windows = "windows"
 )
 
+const (
+	ParamNamePrefix               = "dubbo.config-center."
+	ConfigCenterDirParamName      = ParamNamePrefix + "dir"
+	ConfigCenterEncodingParamName = ParamNamePrefix + "encoding"
+	defaultConfigCenterEncoding   = "UTF-8"
+)
+
+func init() {
+	osType = runtime.GOOS
+	if os.IsPathSeparator('\\') { //前边的判断是否是系统的分隔符

Review comment:
       In english pls

##########
File path: config_center/file/impl.go
##########
@@ -307,3 +312,57 @@ func homeWindows() (string, error) {
 
 	return home, nil
 }
+
+func mkdirIfNecessary(urlRoot string) (string, error) {
+	h := false
+	if len(urlRoot) == 0 {
+		h = true
+		goto Create

Review comment:
       why goto?

##########
File path: config_center/file/impl.go
##########
@@ -307,3 +312,57 @@ func homeWindows() (string, error) {
 
 	return home, nil
 }
+
+func mkdirIfNecessary(urlRoot string) (string, error) {
+	h := false
+	if len(urlRoot) == 0 {
+		h = true
+		goto Create
+	}
+	if _, err := os.Stat(urlRoot); err != nil {
+		h = true
+		goto Create

Review comment:
       as above




----------------------------------------------------------------
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] fangyincheng commented on a change in pull request #932: [Fix] file service discovery path can run in windows

Posted by GitBox <gi...@apache.org>.
fangyincheng commented on a change in pull request #932:
URL: https://github.com/apache/dubbo-go/pull/932#discussion_r549085533



##########
File path: config_center/file/impl.go
##########
@@ -41,13 +40,29 @@ import (
 	"github.com/apache/dubbo-go/config_center/parser"
 )
 
+var osType string
+var path string
+
 const (
-	PARAM_NAME_PREFIX                 = "dubbo.config-center."
-	CONFIG_CENTER_DIR_PARAM_NAME      = PARAM_NAME_PREFIX + "dir"
-	CONFIG_CENTER_ENCODING_PARAM_NAME = PARAM_NAME_PREFIX + "encoding"
-	DEFAULT_CONFIG_CENTER_ENCODING    = "UTF-8"
+	windows = "windows"
 )
 
+const (
+	ParamNamePrefix               = "dubbo.config-center."
+	ConfigCenterDirParamName      = ParamNamePrefix + "dir"
+	ConfigCenterEncodingParamName = ParamNamePrefix + "encoding"
+	defaultConfigCenterEncoding   = "UTF-8"
+)
+
+func init() {
+	osType = runtime.GOOS
+	if os.IsPathSeparator('\\') { //前边的判断是否是系统的分隔符

Review comment:
       english pls




----------------------------------------------------------------
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-io edited a comment on pull request #932: [Fix] file service discovery path can run in windows

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #932:
URL: https://github.com/apache/dubbo-go/pull/932#issuecomment-743769608


   # [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/932?src=pr&el=h1) Report
   > Merging [#932](https://codecov.io/gh/apache/dubbo-go/pull/932?src=pr&el=desc) (55e861a) into [develop](https://codecov.io/gh/apache/dubbo-go/commit/1f708d7cb6c5eff076c64982d33275f762e25b60?el=desc) (1f708d7) will **decrease** coverage by `0.20%`.
   > The diff coverage is `48.57%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go/pull/932/graphs/tree.svg?width=650&height=150&src=pr&token=dcPE6RyFAL)](https://codecov.io/gh/apache/dubbo-go/pull/932?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff             @@
   ##           develop     #932      +/-   ##
   ===========================================
   - Coverage    59.95%   59.74%   -0.21%     
   ===========================================
     Files          260      260              
     Lines        12855    12877      +22     
   ===========================================
   - Hits          7707     7694      -13     
   - Misses        4188     4217      +29     
   - Partials       960      966       +6     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go/pull/932?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [config\_center/file/impl.go](https://codecov.io/gh/apache/dubbo-go/pull/932/diff?src=pr&el=tree#diff-Y29uZmlnX2NlbnRlci9maWxlL2ltcGwuZ28=) | `50.40% <47.05%> (-2.07%)` | :arrow_down: |
   | [registry/file/service\_discovery.go](https://codecov.io/gh/apache/dubbo-go/pull/932/diff?src=pr&el=tree#diff-cmVnaXN0cnkvZmlsZS9zZXJ2aWNlX2Rpc2NvdmVyeS5nbw==) | `45.74% <100.00%> (ø)` | |
   | [registry/kubernetes/registry.go](https://codecov.io/gh/apache/dubbo-go/pull/932/diff?src=pr&el=tree#diff-cmVnaXN0cnkva3ViZXJuZXRlcy9yZWdpc3RyeS5nbw==) | `52.17% <0.00%> (-8.70%)` | :arrow_down: |
   | [cluster/cluster\_impl/base\_cluster\_invoker.go](https://codecov.io/gh/apache/dubbo-go/pull/932/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvYmFzZV9jbHVzdGVyX2ludm9rZXIuZ28=) | `52.77% <0.00%> (-8.34%)` | :arrow_down: |
   | [...tocol/rest/server/server\_impl/go\_restful\_server.go](https://codecov.io/gh/apache/dubbo-go/pull/932/diff?src=pr&el=tree#diff-cHJvdG9jb2wvcmVzdC9zZXJ2ZXIvc2VydmVyX2ltcGwvZ29fcmVzdGZ1bF9zZXJ2ZXIuZ28=) | `43.90% <0.00%> (-4.88%)` | :arrow_down: |
   | [cluster/router/chain/chain.go](https://codecov.io/gh/apache/dubbo-go/pull/932/diff?src=pr&el=tree#diff-Y2x1c3Rlci9yb3V0ZXIvY2hhaW4vY2hhaW4uZ28=) | `67.46% <0.00%> (-3.18%)` | :arrow_down: |
   | [remoting/getty/pool.go](https://codecov.io/gh/apache/dubbo-go/pull/932/diff?src=pr&el=tree#diff-cmVtb3RpbmcvZ2V0dHkvcG9vbC5nbw==) | `68.72% <0.00%> (-0.89%)` | :arrow_down: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go/pull/932?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/932?src=pr&el=footer). Last update [1f708d7...cc7fb2e](https://codecov.io/gh/apache/dubbo-go/pull/932?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 merged pull request #932: [Fix] file service discovery path can run in windows

Posted by GitBox <gi...@apache.org>.
AlexStocks merged pull request #932:
URL: https://github.com/apache/dubbo-go/pull/932


   


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