carddav: populate AddressBook.{Name,MaxResourceSize} in client

This commit is contained in:
Simon Ser
2020-01-19 15:29:51 +01:00
parent c4718a3a49
commit 6e0ea58de1
4 changed files with 34 additions and 9 deletions

View File

@@ -24,6 +24,10 @@ func HTTPErrorFromError(err error) *HTTPError {
}
}
func IsNotFound(err error) bool {
return HTTPErrorFromError(err).Code == http.StatusNotFound
}
func HTTPErrorf(code int, format string, a ...interface{}) *HTTPError {
return &HTTPError{code, fmt.Errorf(format, a...)}
}