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
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
var resTypeProp internal.ResourceType
|
var resType internal.ResourceType
|
||||||
if err := resp.DecodeProp(&resTypeProp); err != nil {
|
if err := resp.DecodeProp(&resType); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
if !resTypeProp.Is(addressBookName) {
|
if !resType.Is(addressBookName) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
var descProp addressbookDescription
|
var desc addressbookDescription
|
||||||
if err := resp.DecodeProp(&descProp); err != nil && !internal.IsNotFound(err) {
|
if err := resp.DecodeProp(&desc); err != nil && !internal.IsNotFound(err) {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
var dispNameProp internal.DisplayName
|
var dispName internal.DisplayName
|
||||||
if err := resp.DecodeProp(&dispNameProp); err != nil && !internal.IsNotFound(err) {
|
if err := resp.DecodeProp(&dispName); err != nil && !internal.IsNotFound(err) {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -131,8 +131,8 @@ func (c *Client) FindAddressBooks(addressBookHomeSet string) ([]AddressBook, err
|
|||||||
|
|
||||||
l = append(l, AddressBook{
|
l = append(l, AddressBook{
|
||||||
Href: href,
|
Href: href,
|
||||||
Name: dispNameProp.Name,
|
Name: dispName.Name,
|
||||||
Description: descProp.Description,
|
Description: desc.Description,
|
||||||
MaxResourceSize: maxResSize.Size,
|
MaxResourceSize: maxResSize.Size,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user