marsevilspirit commented on code in PR #2872:
URL: https://github.com/apache/dubbo-go/pull/2872#discussion_r2086316744


##########
remoting/getty/getty_client.go:
##########
@@ -48,14 +48,14 @@ var (
        errClientClosed      = perrors.New("client closed")
        errClientReadTimeout = perrors.New("maybe the client read timeout or 
fail to decode tcp stream in Writer.Write")
 
-       clientConf *ClientConfig
+       clientConf *ClientConfig = GetDefaultClientConfig()
 
        clientGrPool gxsync.GenericTaskPool
 )
 
 // it is init client for single protocol.
 func initClient(protocol string) {
-       clientConf = GetDefaultClientConfig()
+

Review Comment:
   We don't need this blank line.



##########
remoting/getty/getty_client.go:
##########
@@ -48,14 +48,14 @@ var (
        errClientClosed      = perrors.New("client closed")
        errClientReadTimeout = perrors.New("maybe the client read timeout or 
fail to decode tcp stream in Writer.Write")
 
-       clientConf *ClientConfig
+       clientConf *ClientConfig = GetDefaultClientConfig()

Review Comment:
   You can write it like this:
   ```go
       clientConf = GetDefaultClientConfig()
   ```
   or:
   ```go
   func init() {
       clientConf = GetDefaultClientConfig()
   }
   ```
   I think both are fine.



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