You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by al...@apache.org on 2020/08/09 16:15:10 UTC
[dubbo-go] 02/03: Format codes
This is an automated email from the ASF dual-hosted git repository.
alexstocks pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/dubbo-go.git
commit 2791895b74e3c9f6e40f436d59a9162c9d24511a
Author: lihaowei <ha...@gmail.com>
AuthorDate: Sun Aug 9 11:02:32 2020 +0800
Format codes
---
registry/nacos/listener.go | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/registry/nacos/listener.go b/registry/nacos/listener.go
index 4282bf8..6699007 100644
--- a/registry/nacos/listener.go
+++ b/registry/nacos/listener.go
@@ -132,10 +132,10 @@ func (nl *nacosListener) Callback(services []model.SubscribeService, err error)
instance := generateInstance(services[i])
newInstanceMap[host] = instance
if old, ok := nl.instanceMap[host]; !ok {
- //instance is not exist in cache,add it to cache
+ // instance is not exist in cache, add it to cache
addInstances = append(addInstances, instance)
} else {
- //instance is not different from cache,update it to cache
+ // instance is not different from cache, update it to cache
if !reflect.DeepEqual(old, instance) {
updateInstances = append(updateInstances, instance)
}
@@ -144,7 +144,7 @@ func (nl *nacosListener) Callback(services []model.SubscribeService, err error)
for host, inst := range nl.instanceMap {
if _, ok := newInstanceMap[host]; !ok {
- //cache instance is not exist in new instance list, remove it from cache
+ // cache instance is not exist in new instance list, remove it from cache
delInstances = append(delInstances, inst)
}
}