Description
I ran into an issue that my calendar did not have a getAllDayEndAt()
property and I got an error which was property not found
I think it would be great to have a package with all the possible errors so we can better handle errors in production.
func (event *VEvent) getTimeProp(componentProperty ComponentProperty, expectAllDay bool) (time.Time, error) {
timeProp := event.GetProperty(componentProperty)
if timeProp == nil {
return time.Time{}, errors.New("property not found")
}