internal: fix XML element struct naming

We were sometimes using TitleCase, sometimes Lowercase. Let's align
on the idiomatic Go naming and pick TitleCase everywhere.
This commit is contained in:
Simon Ser
2022-05-31 17:32:12 +02:00
parent 55a9274ba6
commit d7891ce50c
10 changed files with 108 additions and 108 deletions

View File

@@ -35,8 +35,8 @@ func NewClient(c webdav.HTTPClient, endpoint string) (*Client, error) {
}
func (c *Client) FindCalendarHomeSet(principal string) (string, error) {
propfind := internal.NewPropNamePropfind(calendarHomeSetName)
resp, err := c.ic.PropfindFlat(principal, propfind)
propfind := internal.NewPropNamePropFind(calendarHomeSetName)
resp, err := c.ic.PropFindFlat(principal, propfind)
if err != nil {
return "", err
}
@@ -50,14 +50,14 @@ func (c *Client) FindCalendarHomeSet(principal string) (string, error) {
}
func (c *Client) FindCalendars(calendarHomeSet string) ([]Calendar, error) {
propfind := internal.NewPropNamePropfind(
propfind := internal.NewPropNamePropFind(
internal.ResourceTypeName,
internal.DisplayNameName,
calendarDescriptionName,
maxResourceSizeName,
supportedCalendarComponentSetName,
)
ms, err := c.ic.Propfind(calendarHomeSet, internal.DepthOne, propfind)
ms, err := c.ic.PropFind(calendarHomeSet, internal.DepthOne, propfind)
if err != nil {
return nil, err
}
@@ -168,7 +168,7 @@ func encodeCompFilter(filter *CompFilter) *compFilter {
return &encoded
}
func decodeCalendarObjectList(ms *internal.Multistatus) ([]CalendarObject, error) {
func decodeCalendarObjectList(ms *internal.MultiStatus) ([]CalendarObject, error) {
addrs := make([]CalendarObject, 0, len(ms.Responses))
for _, resp := range ms.Responses {
path, err := resp.Path()