Make extensions omitempty
This commit is contained in:
parent
92c794d070
commit
83962a0341
2
entry.go
2
entry.go
@ -20,7 +20,7 @@ type Entry struct {
|
|||||||
Summary *Text `xml:"summary,omitempty"`
|
Summary *Text `xml:"summary,omitempty"`
|
||||||
Title *Text `xml:"title"`
|
Title *Text `xml:"title"`
|
||||||
Updated *Date `xml:"updated"`
|
Updated *Date `xml:"updated"`
|
||||||
Extensions []*ExtensionElement `xml:",any"`
|
Extensions []*ExtensionElement `xml:",any,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (e *Entry) checkAuthors() error {
|
func (e *Entry) checkAuthors() error {
|
||||||
|
2
feed.go
2
feed.go
@ -21,7 +21,7 @@ type Feed struct {
|
|||||||
Subtitle *Text `xml:"subtitle,omitempty"`
|
Subtitle *Text `xml:"subtitle,omitempty"`
|
||||||
Title *Text `xml:"title"`
|
Title *Text `xml:"title"`
|
||||||
Updated *Date `xml:"updated"`
|
Updated *Date `xml:"updated"`
|
||||||
Extensions []*ExtensionElement `xml:",any"`
|
Extensions []*ExtensionElement `xml:",any,omitempty"`
|
||||||
Entries []*Entry `xml:"entry,omitempty"`
|
Entries []*Entry `xml:"entry,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ type Person struct {
|
|||||||
Name string `xml:"name"`
|
Name string `xml:"name"`
|
||||||
URI URI `xml:"uri,omitempty"`
|
URI URI `xml:"uri,omitempty"`
|
||||||
Email EmailAddress `xml:"email,omitempty"`
|
Email EmailAddress `xml:"email,omitempty"`
|
||||||
Extensions []*ExtensionElement `xml:",any"`
|
Extensions []*ExtensionElement `xml:",any,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *Person) Check() error {
|
func (p *Person) Check() error {
|
||||||
|
@ -16,7 +16,7 @@ type Source struct {
|
|||||||
Subtitle *Text `xml:"subtitle,omitempty"`
|
Subtitle *Text `xml:"subtitle,omitempty"`
|
||||||
Title *Text `xml:"title,omitempty"`
|
Title *Text `xml:"title,omitempty"`
|
||||||
Updated *Date `xml:"updated,omitempty"`
|
Updated *Date `xml:"updated,omitempty"`
|
||||||
Extensions []*ExtensionElement `xml:",any"`
|
Extensions []*ExtensionElement `xml:",any,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *Source) Check() error {
|
func (s *Source) Check() error {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user