diff --git a/registry/nacos/listener.go b/registry/nacos/listener.go index 4282bf86be0bb566c415a6614e34526517576650..669900736214178799294f1ba1f97841bb6b81a4 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) } }