internal: add RawXMLValue.Decode

This commit is contained in:
Simon Ser
2020-01-14 18:53:29 +01:00
parent 3beb076950
commit 6f9ff62747
2 changed files with 5 additions and 2 deletions

View File

@@ -1,7 +1,6 @@
package webdav
import (
"encoding/xml"
"fmt"
"net/http"
"strings"
@@ -55,7 +54,7 @@ func (c *Client) FindCurrentUserPrincipal() (string, error) {
propstat := &resp.Propstats[0]
var prop currentUserPrincipalProp
if err := xml.NewTokenDecoder(propstat.Prop.TokenReader()).Decode(&prop); err != nil {
if err := propstat.Prop.Decode(&prop); err != nil {
return "", err
}