TestGetFileID is working,
but FileID cannot be unmarshaled
This commit is contained in:
parent
db69ef238e
commit
8b84480e74
|
|
@ -23,18 +23,26 @@ import (
|
||||||
</d:multistatus>
|
</d:multistatus>
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
/*
|
||||||
|
type MultistatusObj struct {
|
||||||
|
XMLName xml.Name `xml:"multistatus"`
|
||||||
|
Multistatus struct {
|
||||||
|
XMLName xml.Name `xml:"response"`
|
||||||
|
Other string `xml:",innerxml"`
|
||||||
|
}
|
||||||
|
}*/
|
||||||
|
|
||||||
type MultistatusObj struct {
|
type MultistatusObj struct {
|
||||||
XMLName xml.Name `xml:"multistatus"`
|
XMLName xml.Name `xml:"multistatus"`
|
||||||
Multistatus struct {
|
Multistatus struct {
|
||||||
ResponseObj
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
type ResponseObj struct {
|
|
||||||
XMLName xml.Name `xml:"response"`
|
XMLName xml.Name `xml:"response"`
|
||||||
Response struct {
|
Propstat struct {
|
||||||
Content string `xml:",chardata"`
|
XMLName xml.Name `xml:"propstat"`
|
||||||
|
Prop struct {
|
||||||
|
XMLName xml.Name `xml:"prop"`
|
||||||
|
Other string `xml:",innerxml"`
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -49,7 +57,7 @@ func GetFileID(str string) string {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Print(err)
|
fmt.Print(err)
|
||||||
}
|
}
|
||||||
return multi.Multistatus.Response.Content
|
return multi.Multistatus.Propstat.Prop.Other
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestGetFileID(t *testing.T) {
|
func TestGetFileID(t *testing.T) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue