emersion / go-ical

An iCalendar library for Go
MIT License
52 stars 10 forks source link

Add a helper for parsing RecurrenceSets #11

Closed WhyNotHugo closed 2 years ago

WhyNotHugo commented 2 years ago

Mostly missing a setter here; I'm not entirely convinced on how to approach it.

Should all EXDATES be cleared and the ones in the SET be added? Or should be compare and find which ones are missing?

The setter seems to have a bit too much logic and I've a feeling that it's too easy to oversee some corner case.

emersion commented 2 years ago

Mostly missing a setter here; I'm not entirely convinced on how to approach it.

Should all EXDATES be cleared and the ones in the SET be added? Or should be compare and find which ones are missing?

I'd assume a setter to reset all of the fields (RRULE, EXDATE, and so on) and apply the new props. But if you're unsure this is a good idea, we can leave it out of this PR.

WhyNotHugo commented 2 years ago

I've also added a check in case roption == nil.