nanjiek commented on code in PR #3034:
URL: https://github.com/apache/dubbo-go/pull/3034#discussion_r2442444478


##########
protocol/grpc/client.go:
##########
@@ -139,8 +139,12 @@ func NewClient(url *common.URL) (*Client, error) {
        }
 
        key := url.GetParam(constant.InterfaceKey, "")
-       impl := config.GetConsumerServiceByInterfaceName(key)
-       invoker := getInvoker(impl, conn)
+       //TODO: Temporary compatibility with old APIs, can be removed later
+       consumerService := config.GetConsumerServiceByInterfaceName(key)
+       if rpcService, ok := url.GetAttribute(constant.RpcServiceKey); ok {
+               consumerService = rpcService

Review Comment:
   The type assertion to interface{} is unnecessary because every type in Go 
implements interface{}.
   This means the assertion will always succeed, and ok will always be true.



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