Copilot commented on code in PR #1055:
URL: https://github.com/apache/dubbo-go-samples/pull/1055#discussion_r2944040243


##########
generic/README.md:
##########
@@ -9,18 +9,11 @@ This sample demonstrates generic invocation over the Triple 
protocol for Go-Java
 ```
 generic/
 ├── go-server/      # Go provider (Triple protocol, port 50052)
-├── go-client/      # Go consumer with generic invocation (registry discovery)
+├── go-client/      # Go consumer with generic invocation (direct URL)

Review Comment:
   PR description notes this sample needs unreleased dubbo-go main branch code 
(not v3.3.1). Please add a prominent note in this README (near the top) so 
users know they may need to update/replace the dubbo-go dependency before 
running.



##########
generic/README_zh.md:
##########
@@ -79,7 +72,6 @@ mvn clean compile exec:java 
-Dexec.mainClass="org.apache.dubbo.samples.ApiTriple
 
 ```
 Generic Go server started on port 50052

Review Comment:
   “预期输出”里的服务端日志仍是 `Generic Go server started on port 50052`,但当前 Go 服务端日志已改为带 
`(no registry, direct connection)` 后缀。请同步更新该输出示例。
   



##########
generic/java-server/src/main/java/org/apache/dubbo/samples/ApiProvider.java:
##########
@@ -47,19 +37,16 @@ public static void main(String[] args) throws 
InterruptedException {
         tripleService.setVersion(SERVICE_VERSION);
         tripleService.setProtocol(new ProtocolConfig("tri", TRIPLE_PORT));
 
-        // Register provider to ZooKeeper
-        RegistryConfig registryConfig = new RegistryConfig();
-        registryConfig.setAddress(ZOOKEEPER_ADDRESS);
+        // No registry: expose directly on the configured ports
+        RegistryConfig registryConfig = new RegistryConfig("N/A");
 
         DubboBootstrap bootstrap = DubboBootstrap.getInstance();
         bootstrap.application("generic-java-server")
                 .registry(registryConfig)
-                .service(dubboService)
                 .service(tripleService)

Review Comment:
   Avoid hardcoding the no-registry magic string. The codebase already uses 
`RegistryConfig.NO_AVAILABLE` (e.g., tls/java-client) for this case; prefer 
`new RegistryConfig(RegistryConfig.NO_AVAILABLE)` to ensure compatibility if 
the sentinel value ever changes and to match existing conventions.



##########
generic/README.md:
##########
@@ -79,7 +72,6 @@ Server log:
 
 ```
 Generic Go server started on port 50052

Review Comment:
   The "Expected Output" server log no longer matches the updated Go server log 
line (server.go now appends "(no registry, direct connection)"). Please update 
this snippet to reflect the actual output.
   



##########
generic/README_zh.md:
##########
@@ -9,18 +9,11 @@
 ```
 generic/
 ├── go-server/      # Go 服务端(Triple 协议,端口 50052)
-├── go-client/      # Go 客户端,泛化调用(注册中心发现)
+├── go-client/      # Go 客户端,泛化调用(直连 URL)

Review Comment:
   PR 描述提到该示例需要使用 dubbo-go main 分支最新代码(v3.3.1 
无法正常运行)。建议在本文档顶部附近补充醒目的说明,提示用户可能需要更新/replace dubbo-go 依赖后再运行。



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

Reply via email to