This is an automated email from the ASF dual-hosted git repository. albumenj pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/dubbo-go.git
The following commit(s) were added to refs/heads/main by this push: new ca576ddc0 Registries can be set at client and reference level, check and set client level registry if reference level is empty. (#2519) ca576ddc0 is described below commit ca576ddc010ec9c5ec71c356449bbde3ca2b5c4f Author: Ken Liu <ken.lj...@gmail.com> AuthorDate: Wed Nov 22 17:47:31 2023 +0800 Registries can be set at client and reference level, check and set client level registry if reference level is empty. (#2519) --- client/options.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/client/options.go b/client/options.go index 76f562918..686075e6c 100644 --- a/client/options.go +++ b/client/options.go @@ -114,7 +114,13 @@ func (refOpts *ReferenceOptions) init(cli *Client, opts ...ReferenceOption) erro if ref.RegistryIDs == nil || len(ref.RegistryIDs) <= 0 { emptyRegIDsFlag = true } + + // set client level as default registry regs := refOpts.Registries + if regs == nil { + regs = cli.cliOpts.Registries + } + if regs != nil { refOpts.registriesCompat = make(map[string]*config.RegistryConfig) for key, reg := range regs {