This is an automated email from the ASF dual-hosted git repository.

alexstocks pushed a commit to branch 3.0
in repository https://gitbox.apache.org/repos/asf/dubbo-go.git


The following commit(s) were added to refs/heads/3.0 by this push:
     new e284dbf8f config.WithPath方法中ioutil.ReadFile的实参改为conf.path (#2209)
e284dbf8f is described below

commit e284dbf8ff3a51a709bda01467270000ac01f252
Author: 豆腐居士 <[email protected]>
AuthorDate: Sun Feb 12 11:00:19 2023 +0800

    config.WithPath方法中ioutil.ReadFile的实参改为conf.path (#2209)
    
    * [ISSUE #2123] Feat/polaris ratelimit (#2127)
    
    * feat:support polaris limit ability
    
    * [ISSUE #2172] Fix/polaris governance (#2171)
    
    * 解决 consumer 不断重连已下线的 provider meta service 问题 (#2166)
    
    * registry type support all
    
    * fix test
    
    * set default to interface
    
    * use default protocol registry
    
    * fix unit test
    
    * use swith to judge
    
    * add registry support all test
    
    * Resolve registry name conflicts
    
    * fix ut err
    
    * fix https://github.com/apache/dubbo-go/issues/2159
    
    * del front
    
    * del front
    
    Co-authored-by: bobtthp <[email protected]>
    Co-authored-by: bob <[email protected]>
    Co-authored-by: bobtthp <[email protected]>
    Co-authored-by: bob <[email protected]>
    
    * build(deps): bump github.com/hashicorp/vault/sdk from 0.6.0 to 0.6.2 
(#2169)
    
    Bumps [github.com/hashicorp/vault/sdk](https://github.com/hashicorp/vault) 
from 0.6.0 to 0.6.2.
    - [Release notes](https://github.com/hashicorp/vault/releases)
    - [Changelog](https://github.com/hashicorp/vault/blob/main/CHANGELOG.md)
    - [Commits](https://github.com/hashicorp/vault/compare/v0.6.0...v0.6.2)
    
    ---
    updated-dependencies:
    - dependency-name: github.com/hashicorp/vault/sdk
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <[email protected]>
    
    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] 
<49699333+dependabot[bot]@users.noreply.github.com>
    
    * refactor:polaris ability open judge
    
    * refactor:polaris ability open judge
    
    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: bobtthp <[email protected]>
    Co-authored-by: bobtthp <[email protected]>
    Co-authored-by: bob <[email protected]>
    Co-authored-by: bobtthp <[email protected]>
    Co-authored-by: bob <[email protected]>
    Co-authored-by: dependabot[bot] 
<49699333+dependabot[bot]@users.noreply.github.com>
    
    * Dynamic update config for logger level & metric enable (#2180)
    
    * dynamically update logger level & metric enable
    
    * prometheus server start & shutdown
    
    * check nil
    
    * fix ci
    
    Co-authored-by: huangwenkang <642380437@qq>
    
    * Revert "Dynamic update config for logger level & metric enable (#2180)" 
(#2199)
    
    This reverts commit 4c6a99bee53e64e6d883673d2f7f463b42b5c42b.
    
    * Revert "[ISSUE #2172] Fix/polaris governance (#2171)" (#2200)
    
    This reverts commit c1a06982596e2d0c969ff59174e42bfe42430735.
    
    * sync: Merge the 3.0 branch into the master branch (#2201)
    
    * 解决 consumer 不断重连已下线的 provider meta service 问题 (#2166)
    
    * registry type support all
    
    * fix test
    
    * set default to interface
    
    * use default protocol registry
    
    * fix unit test
    
    * use swith to judge
    
    * add registry support all test
    
    * Resolve registry name conflicts
    
    * fix ut err
    
    * fix https://github.com/apache/dubbo-go/issues/2159
    
    * del front
    
    * del front
    
    Co-authored-by: bobtthp <[email protected]>
    Co-authored-by: bob <[email protected]>
    Co-authored-by: bobtthp <[email protected]>
    Co-authored-by: bob <[email protected]>
    
    * build(deps): bump github.com/hashicorp/vault/sdk from 0.6.0 to 0.6.2 
(#2169)
    
    Bumps [github.com/hashicorp/vault/sdk](https://github.com/hashicorp/vault) 
from 0.6.0 to 0.6.2.
    - [Release notes](https://github.com/hashicorp/vault/releases)
    - [Changelog](https://github.com/hashicorp/vault/blob/main/CHANGELOG.md)
    - [Commits](https://github.com/hashicorp/vault/compare/v0.6.0...v0.6.2)
    
    ---
    updated-dependencies:
    - dependency-name: github.com/hashicorp/vault/sdk
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <[email protected]>
    
    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] 
<49699333+dependabot[bot]@users.noreply.github.com>
    
    * Fix: service discovery registry notify before return (#2168)
    
    * Fix: service discovery registry notify before return
    
    * format import
    
    * modify notify url
    
    * add judge about the existence of instance's metadata revision
    
    * build(deps): bump github.com/knadh/koanf from 1.4.4 to 1.4.5 (#2179)
    
    Bumps [github.com/knadh/koanf](https://github.com/knadh/koanf) from 1.4.4 
to 1.4.5.
    - [Release notes](https://github.com/knadh/koanf/releases)
    - [Commits](https://github.com/knadh/koanf/compare/v1.4.4...v1.4.5)
    
    ---
    updated-dependencies:
    - dependency-name: github.com/knadh/koanf
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <[email protected]>
    
    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] 
<49699333+dependabot[bot]@users.noreply.github.com>
    
    * Fix: Replace assignment behavior with copy operation to avoid OOM problem 
(#2182)
    
    * build(deps): bump github.com/hashicorp/vault/sdk from 0.6.2 to 0.7.0 
(#2185)
    
    Bumps [github.com/hashicorp/vault/sdk](https://github.com/hashicorp/vault) 
from 0.6.2 to 0.7.0.
    - [Release notes](https://github.com/hashicorp/vault/releases)
    - [Changelog](https://github.com/hashicorp/vault/blob/main/CHANGELOG.md)
    - [Commits](https://github.com/hashicorp/vault/compare/v0.6.2...v0.7.0)
    
    ---
    updated-dependencies:
    - dependency-name: github.com/hashicorp/vault/sdk
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <[email protected]>
    
    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] 
<49699333+dependabot[bot]@users.noreply.github.com>
    
    * build(deps): bump github.com/nacos-group/nacos-sdk-go (#2183)
    
    Bumps 
[github.com/nacos-group/nacos-sdk-go](https://github.com/nacos-group/nacos-sdk-go)
 from 1.1.3 to 1.1.4.
    - [Release notes](https://github.com/nacos-group/nacos-sdk-go/releases)
    - 
[Commits](https://github.com/nacos-group/nacos-sdk-go/compare/v1.1.3...v1.1.4)
    
    ---
    updated-dependencies:
    - dependency-name: github.com/nacos-group/nacos-sdk-go
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <[email protected]>
    
    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] 
<49699333+dependabot[bot]@users.noreply.github.com>
    
    * build(deps): bump github.com/knadh/koanf from 1.4.5 to 1.5.0 (#2187)
    
    Bumps [github.com/knadh/koanf](https://github.com/knadh/koanf) from 1.4.5 
to 1.5.0.
    - [Release notes](https://github.com/knadh/koanf/releases)
    - [Commits](https://github.com/knadh/koanf/compare/v1.4.5...v1.5.0)
    
    ---
    updated-dependencies:
    - dependency-name: github.com/knadh/koanf
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] 
<49699333+dependabot[bot]@users.noreply.github.com>
    
    * build(deps): bump go.etcd.io/etcd/client/v3 from 3.5.6 to 3.5.7 (#2190)
    
    Bumps [go.etcd.io/etcd/client/v3](https://github.com/etcd-io/etcd) from 
3.5.6 to 3.5.7.
    - [Release notes](https://github.com/etcd-io/etcd/releases)
    - 
[Changelog](https://github.com/etcd-io/etcd/blob/main/Dockerfile-release.amd64)
    - [Commits](https://github.com/etcd-io/etcd/compare/v3.5.6...v3.5.7)
    
    ---
    updated-dependencies:
    - dependency-name: go.etcd.io/etcd/client/v3
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] 
<49699333+dependabot[bot]@users.noreply.github.com>
    
    * build(deps): bump github.com/RoaringBitmap/roaring from 1.2.0 to 1.2.2 
(#2188)
    
    Bumps 
[github.com/RoaringBitmap/roaring](https://github.com/RoaringBitmap/roaring) 
from 1.2.0 to 1.2.2.
    - [Release notes](https://github.com/RoaringBitmap/roaring/releases)
    - 
[Commits](https://github.com/RoaringBitmap/roaring/compare/v1.2.0...v1.2.2)
    
    ---
    updated-dependencies:
    - dependency-name: github.com/RoaringBitmap/roaring
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] 
<49699333+dependabot[bot]@users.noreply.github.com>
    
    * build(deps): bump github.com/RoaringBitmap/roaring from 1.2.2 to 1.2.3 
(#2195)
    
    Bumps 
[github.com/RoaringBitmap/roaring](https://github.com/RoaringBitmap/roaring) 
from 1.2.2 to 1.2.3.
    - [Release notes](https://github.com/RoaringBitmap/roaring/releases)
    - 
[Commits](https://github.com/RoaringBitmap/roaring/compare/v1.2.2...v1.2.3)
    
    ---
    updated-dependencies:
    - dependency-name: github.com/RoaringBitmap/roaring
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] 
<49699333+dependabot[bot]@users.noreply.github.com>
    
    * [ISSUE #2172] Fix/polaris governance (#2171)
    
    * 解决 consumer 不断重连已下线的 provider meta service 问题 (#2166)
    
    * registry type support all
    
    * fix test
    
    * set default to interface
    
    * use default protocol registry
    
    * fix unit test
    
    * use swith to judge
    
    * add registry support all test
    
    * Resolve registry name conflicts
    
    * fix ut err
    
    * fix https://github.com/apache/dubbo-go/issues/2159
    
    * del front
    
    * del front
    
    Co-authored-by: bobtthp <[email protected]>
    Co-authored-by: bob <[email protected]>
    Co-authored-by: bobtthp <[email protected]>
    Co-authored-by: bob <[email protected]>
    
    * build(deps): bump github.com/hashicorp/vault/sdk from 0.6.0 to 0.6.2 
(#2169)
    
    Bumps [github.com/hashicorp/vault/sdk](https://github.com/hashicorp/vault) 
from 0.6.0 to 0.6.2.
    - [Release notes](https://github.com/hashicorp/vault/releases)
    - [Changelog](https://github.com/hashicorp/vault/blob/main/CHANGELOG.md)
    - [Commits](https://github.com/hashicorp/vault/compare/v0.6.0...v0.6.2)
    
    ---
    updated-dependencies:
    - dependency-name: github.com/hashicorp/vault/sdk
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <[email protected]>
    
    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] 
<49699333+dependabot[bot]@users.noreply.github.com>
    
    * refactor:polaris ability open judge
    
    * refactor:polaris ability open judge
    
    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: bobtthp <[email protected]>
    Co-authored-by: bobtthp <[email protected]>
    Co-authored-by: bob <[email protected]>
    Co-authored-by: bobtthp <[email protected]>
    Co-authored-by: bob <[email protected]>
    Co-authored-by: dependabot[bot] 
<49699333+dependabot[bot]@users.noreply.github.com>
    
    * Dynamic update config for logger level & metric enable (#2180)
    
    * dynamically update logger level & metric enable
    
    * prometheus server start & shutdown
    
    * check nil
    
    * fix ci
    
    Co-authored-by: huangwenkang <642380437@qq>
    
    ---------
    
    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: bobtthp <[email protected]>
    Co-authored-by: bobtthp <[email protected]>
    Co-authored-by: bob <[email protected]>
    Co-authored-by: bobtthp <[email protected]>
    Co-authored-by: bob <[email protected]>
    Co-authored-by: dependabot[bot] 
<49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: Leo Shen <[email protected]>
    Co-authored-by: Jason Peng <[email protected]>
    Co-authored-by: liaochuntao <[email protected]>
    Co-authored-by: Wenkang Huang 
<[email protected]>
    Co-authored-by: huangwenkang <642380437@qq>
    
    * ci
    
    ---------
    
    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: liaochuntao <[email protected]>
    Co-authored-by: AlexStocks <[email protected]>
    Co-authored-by: bobtthp <[email protected]>
    Co-authored-by: bobtthp <[email protected]>
    Co-authored-by: bob <[email protected]>
    Co-authored-by: bobtthp <[email protected]>
    Co-authored-by: bob <[email protected]>
    Co-authored-by: dependabot[bot] 
<49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: Wenkang Huang 
<[email protected]>
    Co-authored-by: huangwenkang <642380437@qq>
    Co-authored-by: Xuewei Niu <[email protected]>
    Co-authored-by: Leo Shen <[email protected]>
    Co-authored-by: Jason Peng <[email protected]>
    Co-authored-by: aqi <[email protected]>
---
 config/config_loader_options.go | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/config/config_loader_options.go b/config/config_loader_options.go
index 61554f0da..03cbe1ff1 100644
--- a/config/config_loader_options.go
+++ b/config/config_loader_options.go
@@ -86,7 +86,7 @@ func (fn loaderConfigFunc) apply(vc *loaderConf) {
 }
 
 // WithGenre set load config file suffix
-//Deprecated: replaced by WithSuffix
+// Deprecated: replaced by WithSuffix
 func WithGenre(suffix string) LoaderConfOption {
        return loaderConfigFunc(func(conf *loaderConf) {
                g := strings.ToLower(suffix)
@@ -108,7 +108,7 @@ func WithSuffix(suffix file.Suffix) LoaderConfOption {
 func WithPath(path string) LoaderConfOption {
        return loaderConfigFunc(func(conf *loaderConf) {
                conf.path = absolutePath(path)
-               if bytes, err := ioutil.ReadFile(path); err != nil {
+               if bytes, err := ioutil.ReadFile(conf.path); err != nil {
                        panic(err)
                } else {
                        conf.bytes = bytes
@@ -157,7 +157,7 @@ func absolutePath(inPath string) string {
        return ""
 }
 
-//userHomeDir get gopath
+// userHomeDir get gopath
 func userHomeDir() string {
        if runtime.GOOS == "windows" {
                home := os.Getenv("HOMEDRIVE") + os.Getenv("HOMEPATH")
@@ -179,7 +179,7 @@ func checkFileSuffix(suffix string) error {
        return errors.Errorf("no support file suffix: %s", suffix)
 }
 
-//resolverFilePath resolver file path
+// resolverFilePath resolver file path
 // eg: give a ./conf/dubbogo.yaml return dubbogo and yaml
 func resolverFilePath(path string) (name, suffix string) {
        paths := strings.Split(path, "/")
@@ -190,7 +190,7 @@ func resolverFilePath(path string) (name, suffix string) {
        return fileName[0], fileName[1]
 }
 
-//MergeConfig merge config file
+// MergeConfig merge config file
 func (conf *loaderConf) MergeConfig(koan *koanf.Koanf) *koanf.Koanf {
        var (
                activeKoan *koanf.Koanf

Reply via email to