Closed fty4 closed 2 years ago
LGTM. Wish github's line difference algorithm would be a little more forgiving on line movements. (Change looks more significant than what it is.)
I hope there isn't a merge order with this.
Thanks for the effort @fty4 I like a rich set of helper/utility functions with my api. (Hypocritically I didn't provide many in the original.)
Description This will allow to create a event with uniqueId.
Background Currently it is very easy to create a
VEvent
withe := ics.VEvent{}
. But there is a issue with setting the uniqueId. This is not easy possible without a big efford which it should not be.Unfortunally there is no direct function for changing the uid. But it is probably better to address this functionality directly in the event creation anyway.
New implementation
NewEvent
to create a new event (having uid) without directly adding it to a calendar.AddEvent
func to use new function.Example The code works as follows:
output:
With #45 merged the event also can be added straightforward with: