Skip to content

Commit

Permalink
rename Router to Routers
Browse files Browse the repository at this point in the history
  • Loading branch information
dongjianhui03 committed Oct 25, 2021
1 parent 52090c3 commit 191ffc0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion config/config_loader_options.go
Expand Up @@ -47,7 +47,7 @@ type loaderConf struct {
}

func NewLoaderConf(opts ...LoaderConfOption) *loaderConf {
configFilePath := "../conf/dubbogo.yaml"
configFilePath := "../conf/dubbogo.yml"
if configFilePathFromEnv := os.Getenv(constant.CONFIG_FILE_ENV_KEY); configFilePathFromEnv != "" {
configFilePath = configFilePathFromEnv
}
Expand Down
4 changes: 2 additions & 2 deletions config/root_config.go
Expand Up @@ -72,7 +72,7 @@ type RootConfig struct {
// Shutdown config
Shutdown *ShutdownConfig `yaml:"shutdown" json:"shutdown,omitempty" property:"shutdown"`

Router []*RouterConfig `yaml:"router" json:"router,omitempty" property:"router"`
Routers []*RouterConfig `yaml:"routers" json:"router,omitempty" property:"router"`

EventDispatcherType string `default:"direct" yaml:"event-dispatcher-type" json:"event-dispatcher-type,omitempty"`

Expand Down Expand Up @@ -279,7 +279,7 @@ func (rb *RootConfigBuilder) SetShutdown(shutdown *ShutdownConfig) *RootConfigBu
}

func (rb *RootConfigBuilder) SetRouter(router []*RouterConfig) *RootConfigBuilder {
rb.rootConfig.Router = router
rb.rootConfig.Routers = router
return rb
}

Expand Down
4 changes: 2 additions & 2 deletions config/router_config.go
Expand Up @@ -59,14 +59,14 @@ func (c *RouterConfig) Init() error {
}

func initRouterConfig(rc *RootConfig) error {
routers := rc.Router
routers := rc.Routers
if len(routers) > 0 {
for _, r := range routers {
if err := r.Init(); err != nil {
return err
}
}
rc.Router = routers
rc.Routers = routers
}

//chain.SetVSAndDRConfigByte(vsBytes, drBytes)
Expand Down

0 comments on commit 191ffc0

Please sign in to comment.