carddav: simplify variable names

This commit is contained in:
Simon Ser 2020-01-21 21:04:19 +01:00
parent ffc628aed9
commit 45774fe572
No known key found for this signature in database
GPG Key ID: 0FDE7BE0E88F5E48
2 changed files with 10 additions and 10 deletions

View File

@ -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,
})
}

View File

@ -5,9 +5,9 @@ import (
"io"
"mime"
"net/http"
"net/url"
"os"
"path"
"net/url"
"github.com/emersion/go-webdav/internal"
)