mirror of
https://github.com/1f349/go-webdav.git
synced 2024-12-22 00:04:19 +00:00
caldav: upgrade to latest go-ical API
This commit is contained in:
parent
4c419a961d
commit
514296664c
@ -180,7 +180,7 @@ func decodeCalendarObjectList(ms *internal.Multistatus) ([]CalendarObject, error
|
||||
}
|
||||
|
||||
r := bytes.NewReader(calData.Data)
|
||||
data, err := ical.NewDecoder(r).DecodeCalendar()
|
||||
data, err := ical.NewDecoder(r).Decode()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -264,7 +264,7 @@ func (c *Client) GetCalendarObject(path string) (*CalendarObject, error) {
|
||||
return nil, fmt.Errorf("caldav: expected Content-Type %q, got %q", ical.MIMEType, mediaType)
|
||||
}
|
||||
|
||||
cal, err := ical.NewDecoder(resp.Body).DecodeCalendar()
|
||||
cal, err := ical.NewDecoder(resp.Body).Decode()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -287,7 +287,7 @@ func (c *Client) PutCalendarObject(path string, cal *ical.Calendar) (*CalendarOb
|
||||
// https://github.com/Kozea/Radicale/issues/1016
|
||||
|
||||
var buf bytes.Buffer
|
||||
if err := ical.NewEncoder(&buf).EncodeCalendar(cal); err != nil {
|
||||
if err := ical.NewEncoder(&buf).Encode(cal); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
2
go.mod
2
go.mod
@ -3,6 +3,6 @@ module github.com/emersion/go-webdav
|
||||
go 1.13
|
||||
|
||||
require (
|
||||
github.com/emersion/go-ical v0.0.0-20200224170602-c9b8621220bc
|
||||
github.com/emersion/go-ical v0.0.0-20200224201310-cd514449c39e
|
||||
github.com/emersion/go-vcard v0.0.0-20191221110513-5f81fa0d3cc7
|
||||
)
|
||||
|
4
go.sum
4
go.sum
@ -1,4 +1,4 @@
|
||||
github.com/emersion/go-ical v0.0.0-20200224170602-c9b8621220bc h1:kpISLFxf4eYcslxD/XkzE2Su7UQdNKt0XYgnN6MEUxg=
|
||||
github.com/emersion/go-ical v0.0.0-20200224170602-c9b8621220bc/go.mod h1:4xVTBPcT43a1pp3vdaa+FuRdX5XhKCZPpWv7m0z9ByM=
|
||||
github.com/emersion/go-ical v0.0.0-20200224201310-cd514449c39e h1:YGM1sI7edZOt8KAfX9Miq/X99d2QXdgjkJ7vN4HjxAA=
|
||||
github.com/emersion/go-ical v0.0.0-20200224201310-cd514449c39e/go.mod h1:4xVTBPcT43a1pp3vdaa+FuRdX5XhKCZPpWv7m0z9ByM=
|
||||
github.com/emersion/go-vcard v0.0.0-20191221110513-5f81fa0d3cc7 h1:SE+tcd+0kn0cT4MqTo66gmkjqWHF1Z+Yha5/rhLs/H8=
|
||||
github.com/emersion/go-vcard v0.0.0-20191221110513-5f81fa0d3cc7/go.mod h1:HMJKR5wlh/ziNp+sHEDV2ltblO4JD2+IdDOWtGcQBTM=
|
||||
|
Loading…
Reference in New Issue
Block a user