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.
decort-golang-sdk/pkg/cloudapi/image/ids.go

20 lines
420 B

package image
// IDs gets array of ImageIDs from ListImages struct
func (li ListImages) IDs() []uint64 {
res := make([]uint64, 0, len(li.Data))
for _, i := range li.Data {
res = append(res, i.ID)
}
return res
}
// IDs gets array of HistoryIDs from ListHistories struct
func (lh ListHistories) IDs() []uint64 {
res := make([]uint64, 0, len(lh))
for _, h := range lh {
res = append(res, h.ID)
}
return res
}