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


##########
server/server.go:
##########
@@ -39,13 +39,21 @@ import (
 )
 
 // proServices are for internal services
-var proServices = make([]*InternalService, 0, 16)
-var proLock sync.Mutex
+var internalProServices = make([]*InternalService, 0, 16)
+var internalProLock sync.Mutex
 
 type Server struct {
        cfg *ServerOptions
 
-       svcOptsMap sync.Map
+       mu sync.RWMutex
+       // key: *ServiceOptions, value: *common.ServiceInfo
+       //proServices map[string]common.RPCService
+       // change any to *common.ServiceInfo @see config/service.go
+       svcOptsMap map[string]*ServiceOptions
+       // key is interface name, value is *ServiceOptions
+       interfaceNameServices map[string]*ServiceOptions
+       // indicate whether the server is already started
+       serve bool
 }

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