go-webdav icon indicating copy to clipboard operation
go-webdav copied to clipboard

nil check for multiGet pointless?

Open mrusme opened this issue 3 years ago • 0 comments

I'm looking at the following code and I'm wondering whether it makes sense:

https://github.com/emersion/go-webdav/blob/13fa812f94c19e869d39b3610b06bfe9f42fda35/carddav/client.go#L308-L315

From what I see multiGet cannot be nil, because &multiGet.DataRequest would throw an invalid memory address / nil pointer error. Hence the check if multiGet == nil seems kind of pointless here.

Either that check should happen earlier or not at all, imho.

mrusme avatar May 29 '22 23:05 mrusme