diff --git a/ical.go b/ical.go index 48040c9..023bfe3 100644 --- a/ical.go +++ b/ical.go @@ -126,6 +126,7 @@ type VEvent struct { SUMMARY string DESCRIPTION string TZID string + LOCATION string AllDay bool } @@ -174,6 +175,11 @@ func (e *VEvent) EncodeIcal(w io.Writer) error { return err } } + if e.LOCATION != "" { + if _, err := b.WriteString("LOCATION:" + e.LOCATION + "\r\n"); err != nil { + return err + } + } if _, err := b.WriteString("DTSTART;" + tzidTxt + "VALUE=" + timeStampType + ":" + e.DTSTART.Format(timeStampLayout) + "\r\n"); err != nil { return err }