Cleanup
This commit is contained in:
8
feed.go
8
feed.go
@@ -25,6 +25,10 @@ type Feed struct {
|
||||
Entries []*Entry `xml:"entry,omitempty"`
|
||||
}
|
||||
|
||||
func (f *Feed) AddExtension(name string, value any) {
|
||||
f.Extensions = append(f.Extensions, &ExtensionElement{XMLName: xml.Name{Local: name}, Value: value})
|
||||
}
|
||||
|
||||
func (f *Feed) Check() error {
|
||||
if f.ID == nil {
|
||||
return errors.New("no id element of feed")
|
||||
@@ -156,10 +160,6 @@ func (f *Feed) Standardize() {
|
||||
}
|
||||
}
|
||||
|
||||
func (f *Feed) AddExtension(name string, value any) {
|
||||
f.Extensions = append(f.Extensions, &ExtensionElement{XMLName: xml.Name{Local: name}, Value: value})
|
||||
}
|
||||
|
||||
func (f *Feed) ToXML(encoding string) (string, error) {
|
||||
xml, err := xml.MarshalIndent(f, "", " ")
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user