My application has a slice of a struct like so
type ItemOrder struct {
ItemId
...
}
var items = []*ItemOrder
And a variadic function accepting ...int
func ItemIds(lang string, ids ...int){
...
How can I take all itemIds from the items []*ItemOrder
slice and supply it to the variadic function? Something like
itemsPB, err := ItemIds("", items[:].itemId)
Abov doesnt work because im not giving the slice a position to extract itemId from.