mirror of
https://github.com/1f349/go-webdav.git
synced 2024-12-22 16:24:14 +00:00
carddav: simplify variable names
This commit is contained in:
parent
ffc628aed9
commit
45774fe572
@ -103,21 +103,21 @@ func (c *Client) FindAddressBooks(addressBookHomeSet string) ([]AddressBook, err
|
||||
return nil, err
|
||||
}
|
||||
|
||||
var resTypeProp internal.ResourceType
|
||||
if err := resp.DecodeProp(&resTypeProp); err != nil {
|
||||
var resType internal.ResourceType
|
||||
if err := resp.DecodeProp(&resType); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !resTypeProp.Is(addressBookName) {
|
||||
if !resType.Is(addressBookName) {
|
||||
continue
|
||||
}
|
||||
|
||||
var descProp addressbookDescription
|
||||
if err := resp.DecodeProp(&descProp); err != nil && !internal.IsNotFound(err) {
|
||||
var desc addressbookDescription
|
||||
if err := resp.DecodeProp(&desc); err != nil && !internal.IsNotFound(err) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
var dispNameProp internal.DisplayName
|
||||
if err := resp.DecodeProp(&dispNameProp); err != nil && !internal.IsNotFound(err) {
|
||||
var dispName internal.DisplayName
|
||||
if err := resp.DecodeProp(&dispName); err != nil && !internal.IsNotFound(err) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@ -131,8 +131,8 @@ func (c *Client) FindAddressBooks(addressBookHomeSet string) ([]AddressBook, err
|
||||
|
||||
l = append(l, AddressBook{
|
||||
Href: href,
|
||||
Name: dispNameProp.Name,
|
||||
Description: descProp.Description,
|
||||
Name: dispName.Name,
|
||||
Description: desc.Description,
|
||||
MaxResourceSize: maxResSize.Size,
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user