mirror of
https://github.com/duanhf2012/origin.git
synced 2026-02-16 00:44:42 +08:00
优化获取NodeId接口
This commit is contained in:
@@ -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{}{}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user