Beispiel #1
0
// AddAccessory adds an accessory to the container.
// This method ensures that the accessory ids are valid and unique withing the container.
func (m *Container) AddAccessory(a *accessory.Accessory) {
	a.SetID(m.idCount)
	m.idCount++
	m.Accessories = append(m.Accessories, a)
}