mirror of
https://github.com/duanhf2012/origin.git
synced 2026-02-03 22:45:13 +08:00
优化获取NodeId接口
This commit is contained in:
@@ -465,7 +465,7 @@ func GetNodeByServiceName(serviceName string) map[int]struct{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
var mapNodeId map[int]struct{}
|
||||
mapNodeId := map[int]struct{}{}
|
||||
for nodeId,_ := range mapNode {
|
||||
mapNodeId[nodeId] = struct{}{}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user