For omitempty to work properly, nested structs have to be pointers

This commit is contained in:
Deluan
2016-03-02 12:06:57 -05:00
parent 01c68d6802
commit 7c82af75f5
4 changed files with 6 additions and 6 deletions
+3 -3
View File
@@ -7,9 +7,9 @@ type Subsonic struct {
Status string `xml:"status,attr"`
Version string `xml:"version,attr"`
Body []byte `xml:",innerxml"`
License License `xml:",omitempty"`
MusicFolders MusicFolders `xml:",omitempty"`
ArtistIndex ArtistIndex `xml:",omitempty"`
License *License `xml:",omitempty"`
MusicFolders *MusicFolders `xml:",omitempty"`
ArtistIndex *ArtistIndex `xml:",omitempty"`
}
type License struct {