Skip to content

Commit

Permalink
Merge pull request #13 from li-xiaocheng/devicesort
Browse files Browse the repository at this point in the history
fix nodeinfo sort item error
  • Loading branch information
mYmNeo authored Nov 26, 2020
2 parents 4d10316 + 0922711 commit 47d56ae
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/device/sort.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ var (
result = d1.AllocatableCores() < d2.AllocatableCores()
case *NodeInfo:
n1 := p1.(*NodeInfo)
n2 := p1.(*NodeInfo)
n2 := p2.(*NodeInfo)
result = n1.GetAvailableCore() < n2.GetAvailableCore()
}
return result
Expand All @@ -46,7 +46,7 @@ var (
result = d1.AllocatableMemory() < d2.AllocatableMemory()
case *NodeInfo:
n1 := p1.(*NodeInfo)
n2 := p1.(*NodeInfo)
n2 := p2.(*NodeInfo)
result = n1.GetAvailableMemory() < n2.GetAvailableMemory()
}
return result
Expand All @@ -61,7 +61,7 @@ var (
result = d1.GetID() < d2.GetID()
case *NodeInfo:
n1 := p1.(*NodeInfo)
n2 := p1.(*NodeInfo)
n2 := p2.(*NodeInfo)
result = n1.GetName() < n2.GetName()
}
return result
Expand Down

0 comments on commit 47d56ae

Please sign in to comment.