mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Allow the map.Values() function in the CPUManager to take a set of keys
Signed-off-by: Kevin Klues <kklues@nvidia.com>
This commit is contained in:
parent
a160d9a8cd
commit
cfacc22459
@ -52,10 +52,13 @@ func (m mapIntInt) Keys() []int {
|
||||
return keys
|
||||
}
|
||||
|
||||
func (m mapIntInt) Values() []int {
|
||||
func (m mapIntInt) Values(keys ...int) []int {
|
||||
if keys == nil {
|
||||
keys = m.Keys()
|
||||
}
|
||||
var values []int
|
||||
for _, v := range m {
|
||||
values = append(values, v)
|
||||
for _, k := range keys {
|
||||
values = append(values, m[k])
|
||||
}
|
||||
return values
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user