mirror of
https://github.com/1f349/go-webdav.git
synced 2024-12-22 08:14:15 +00:00
caldav, carddav: drop unnecessary nil check
Closes: https://github.com/emersion/go-webdav/issues/92
This commit is contained in:
parent
571eba7c02
commit
fc4ea1aae2
@ -244,7 +244,7 @@ func (c *Client) MultiGetCalendar(path string, multiGet *CalendarMultiGet) ([]Ca
|
|||||||
|
|
||||||
calendarMultiget := calendarMultiget{Prop: propReq}
|
calendarMultiget := calendarMultiget{Prop: propReq}
|
||||||
|
|
||||||
if multiGet == nil || len(multiGet.Paths) == 0 {
|
if len(multiGet.Paths) == 0 {
|
||||||
href := internal.Href{Path: path}
|
href := internal.Href{Path: path}
|
||||||
calendarMultiget.Hrefs = []internal.Href{href}
|
calendarMultiget.Hrefs = []internal.Href{href}
|
||||||
} else {
|
} else {
|
||||||
|
@ -313,7 +313,7 @@ func (c *Client) MultiGetAddressBook(path string, multiGet *AddressBookMultiGet)
|
|||||||
|
|
||||||
addressbookMultiget := addressbookMultiget{Prop: propReq}
|
addressbookMultiget := addressbookMultiget{Prop: propReq}
|
||||||
|
|
||||||
if multiGet == nil || len(multiGet.Paths) == 0 {
|
if len(multiGet.Paths) == 0 {
|
||||||
href := internal.Href{Path: path}
|
href := internal.Href{Path: path}
|
||||||
addressbookMultiget.Hrefs = []internal.Href{href}
|
addressbookMultiget.Hrefs = []internal.Href{href}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user