You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
440 B
21 lines
440 B
package disks
|
|
|
|
// IDs gets array of DiskIDs from ListDisks struct
|
|
func (ld ListDisks) IDs() []uint64 {
|
|
res := make([]uint64, 0, len(ld.Data))
|
|
for _, d := range ld.Data {
|
|
res = append(res, d.ID)
|
|
}
|
|
return res
|
|
}
|
|
|
|
// IDs gets array of DiskIDs from ListUnattachedDisks struct
|
|
func (ldu ListUnattachedDisks) IDs() []uint64 {
|
|
res := make([]uint64, 0, len(ldu.Data))
|
|
for _, d := range ldu.Data {
|
|
res = append(res, d.ID)
|
|
}
|
|
return res
|
|
}
|
|
|