apognu/gocal

How to read an ICAL from a URI?

Closed this issue · 1 comments

wsw70 commented

This is not an issue and the question is not strictly related to gocal but I was hoping that you may have had the issue / question before (I am starting with Go, which is quite a stretch from the Python I am used to :))

I have a URI that points to an ICAL file and was wondering if there is a clever way to parse it directly instead of going through "download the file, and then parse the downloaded file"?

My main problem is to find a matching type between what I http.Get() and what is expected by gocal.

wsw70 commented

OK, found it:

get, _:= http.Get("https://...")
c := gocal.NewParser(get.Body)