Skip to content
Snippets Groups Projects
Commit 17cc8f37 authored by lihaowei's avatar lihaowei Committed by AlexStocks
Browse files

Format codes

parent 04255e60
No related branches found
No related tags found
No related merge requests found
......@@ -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)
}
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment