go fmt
This commit is contained in:
@@ -32,9 +32,9 @@ func init() {
|
||||
}
|
||||
|
||||
type error struct {
|
||||
XMLName xml.Name`xml:"error"`
|
||||
Code int `xml:"code,attr"`
|
||||
Message string `xml:"message,attr"`
|
||||
XMLName xml.Name `xml:"error"`
|
||||
Code int `xml:"code,attr"`
|
||||
Message string `xml:"message,attr"`
|
||||
}
|
||||
|
||||
func NewError(errorCode int) []byte {
|
||||
@@ -47,4 +47,4 @@ func NewError(errorCode int) []byte {
|
||||
response.Body = xmlBody
|
||||
xmlResponse, _ := xml.Marshal(response)
|
||||
return []byte(xml.Header + string(xmlResponse))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,5 +4,5 @@ import "encoding/xml"
|
||||
|
||||
type License struct {
|
||||
XMLName xml.Name `xml:"license"`
|
||||
Valid bool `xml:"valid,attr"`
|
||||
}
|
||||
Valid bool `xml:"valid,attr"`
|
||||
}
|
||||
|
||||
@@ -4,11 +4,11 @@ import "encoding/xml"
|
||||
|
||||
type MusicFolder struct {
|
||||
XMLName xml.Name `xml:"musicFolder"`
|
||||
Id string `xml:"id,attr"`
|
||||
Name string `xml:"name,attr"`
|
||||
Id string `xml:"id,attr"`
|
||||
Name string `xml:"name,attr"`
|
||||
}
|
||||
|
||||
type MusicFolders struct {
|
||||
XMLName xml.Name `xml:"musicFolders"`
|
||||
XMLName xml.Name `xml:"musicFolders"`
|
||||
Folders []MusicFolder `xml:"musicFolders"`
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ type Subsonic struct {
|
||||
XMLName xml.Name `xml:"http://subsonic.org/restapi subsonic-response"`
|
||||
Status string `xml:"status,attr"`
|
||||
Version string `xml:"version,attr"`
|
||||
Body []byte `xml:",innerxml"`
|
||||
Body []byte `xml:",innerxml"`
|
||||
}
|
||||
|
||||
func NewEmpty() Subsonic {
|
||||
@@ -22,4 +22,4 @@ func NewXML(body interface{}) []byte {
|
||||
response.Body = xmlBody
|
||||
xmlResponse, _ := xml.Marshal(response)
|
||||
return []byte(xml.Header + string(xmlResponse))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user