package specialAPIModels import ( I "devel.mephi.ru/dyokunev/wwwvoip/app/iface" "voip/app/models" ) type Room struct { Appointment } type Rooms []Room func (rooms *Rooms) IConvert(apiHost string, affiliateUnit *models.Unit) (I.Slice, error) { var convertedRooms models.Rooms for _, room := range *rooms { convertedRoom := models.Room{ RootUnitId: affiliateUnit.Id, RootUnitKey: affiliateUnit.CodeStr, Name: room.Room, } convertedRoom.GenKey() convertedRooms = append(convertedRooms, convertedRoom) } return convertedRooms, nil }