emersion / go-webdav

A Go library for WebDAV, CalDAV and CardDAV
MIT License
326 stars 71 forks source link

carddav: switch to one static path layout #101

Closed bitfehler closed 2 years ago

bitfehler commented 2 years ago

See #100 for details. Obsoletes #99.

bitfehler commented 2 years ago

So, if I recall our discussion correctly, going for a static path layout is probably the most agreeable solution of the bunch, is that correct? For this PR, I added the option to define a global prefix (if your webdav root is not /) based on which a fixed layout is expected. The advantage is that the backend does not have to deal with the "resource type", so the interface stays simple. The code gets a little longer, but stays pretty easy to follow in my opinion. I also added a test. Would love to hear your opinion on this :slightly_smiling_face:

emersion commented 2 years ago

Thanks!