Properly use xml names

This commit is contained in:
2024-10-17 20:10:18 +02:00
parent 26e0c99150
commit 9c38048bd2
15 changed files with 51 additions and 23 deletions

View File

@@ -1,6 +1,7 @@
package atom
import (
"encoding/xml"
"errors"
"fmt"
"strings"
@@ -12,16 +13,17 @@ import (
// a non-empty atom:summary element when the entry contains no atom:content
// element.
type Entry struct {
XMLName xml.Name `xml:"entry"`
*CommonAttributes
Authors []*Person `xml:"author,omitempty"`
Categories []*Category `xml:"category,omitempty"`
Content Content `xml:"content,omitempty"`
Contributors []*Person `xml:"contributors,omitempty"`
ID *ID `xml:"id"`
Links []*Link `xml:"link,omitempty"`
Authors []*Person `xml:"author,omitempty"`
Categories []*Category `xml:",omitempty"`
Content Content `xml:",omitempty"`
Contributors []*Person `xml:"contributors,omitempty"`
ID *ID
Links []*Link `xml:",omitempty"`
Published *Date `xml:"published,omitempty"`
Rights Text `xml:"rights,omitempty"`
Source *Source `xml:"source,omitempty"`
Source *Source `xml:",omitempty"`
Summary Text `xml:"summary,omitempty"`
Title Text `xml:"title"`
Updated *Date `xml:"updated"`