优化获取NodeId接口

This commit is contained in:
orgin
2022-07-11 15:34:28 +08:00
parent 3763f7d848
commit 3ce873ef04

View File

@@ -465,7 +465,7 @@ func GetNodeByServiceName(serviceName string) map[int]struct{} {
return nil return nil
} }
var mapNodeId map[int]struct{} mapNodeId := map[int]struct{}{}
for nodeId,_ := range mapNode { for nodeId,_ := range mapNode {
mapNodeId[nodeId] = struct{}{} mapNodeId[nodeId] = struct{}{}
} }