AlexStocks commented on code in PR #1113:
URL: https://github.com/apache/dubbo-go-samples/pull/1113#discussion_r3456653356
##########
rpc/triple/old_triple/go-server/cmd/main.go:
##########
@@ -39,9 +42,35 @@ func (srv *GreetDubbo3Server) Greet(ctx context.Context, req
*greet.GreetRequest
}
func main() {
- config.SetProviderService(&GreetDubbo3Server{})
- if err := config.Load(); err != nil {
+ ins, err := dubbo.NewInstance(
+ dubbo.WithName("dubbo_rpc_triple_old_triple_server"),
Review Comment:
[P1] 这里把 `old_triple` 服务端从 `config.Load()` 改成了全代码内硬编码,但仓库里仍然保留着
`rpc/triple/old_triple/go-server/conf/dubbogo.yml`,而且其中还配置了 `triple.port` 和
`provider.services.GreetDubbo3Server.interface`。现在读者继续按样例去改这份配置文件,端口、接口名、未来补上的
registry 配置都不会生效,示例会出现“看起来有配置、实际上完全不读”的漂移。这里至少要二选一:要么继续从配置文件加载,要么把这份死配置删掉并把
README/目录结构一起收干净。
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]