caldav, carddav: drop unnecessary nil check

Closes: https://github.com/emersion/go-webdav/issues/92
This commit is contained in:
Simon Ser 2023-08-25 13:35:33 +02:00
parent 571eba7c02
commit fc4ea1aae2
2 changed files with 2 additions and 2 deletions

View File

@ -244,7 +244,7 @@ func (c *Client) MultiGetCalendar(path string, multiGet *CalendarMultiGet) ([]Ca
calendarMultiget := calendarMultiget{Prop: propReq}
if multiGet == nil || len(multiGet.Paths) == 0 {
if len(multiGet.Paths) == 0 {
href := internal.Href{Path: path}
calendarMultiget.Hrefs = []internal.Href{href}
} else {

View File

@ -313,7 +313,7 @@ func (c *Client) MultiGetAddressBook(path string, multiGet *AddressBookMultiGet)
addressbookMultiget := addressbookMultiget{Prop: propReq}
if multiGet == nil || len(multiGet.Paths) == 0 {
if len(multiGet.Paths) == 0 {
href := internal.Href{Path: path}
addressbookMultiget.Hrefs = []internal.Href{href}
} else {