package calendarops import ( "errors" basetypes "code.apps.glenux.net/glenux/kiwimix/pkg/basetypes" ) // IntersectCalendarOperation is an operation that intersects a calendar with // another type IntersectCalendarOperation struct{} // Ensure IntersectCalendarOperation implements CalendarOperation var _ CalendarOperation = (*IntersectCalendarOperation)(nil) func (op IntersectCalendarOperation) Execute(calendars ...basetypes.Calendar) (basetypes.Calendar, error) { if len(calendars) != 2 { return basetypes.Calendar{}, errors.New("Difference operation requires exactly two calendars") } // Do your union operation here and return the new union basetypes. return calendars[0], nil // Replace this with actual implementation }