|
|
|
@ -85,7 +85,7 @@ func ToXML(feed XmlFeed) (string, error) {
|
|
|
|
|
return s, nil |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Write a feed object (either a Feed, AtomFeed, or RssFeed) as XML into
|
|
|
|
|
// WriteXML writes a feed object (either a Feed, AtomFeed, or RssFeed) as XML into
|
|
|
|
|
// the writer. Returns an error if XML marshaling fails.
|
|
|
|
|
func WriteXML(feed XmlFeed, w io.Writer) error { |
|
|
|
|
x := feed.FeedXml() |
|
|
|
@ -104,7 +104,7 @@ func (f *Feed) ToAtom() (string, error) {
|
|
|
|
|
return ToXML(a) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Writes an Atom representation of this feed to the writer.
|
|
|
|
|
// WriteAtom writes an Atom representation of this feed to the writer.
|
|
|
|
|
func (f *Feed) WriteAtom(w io.Writer) error { |
|
|
|
|
return WriteXML(&Atom{f}, w) |
|
|
|
|
} |
|
|
|
@ -115,7 +115,7 @@ func (f *Feed) ToRss() (string, error) {
|
|
|
|
|
return ToXML(r) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Writes an RSS representation of this feed to the writer.
|
|
|
|
|
// WriteRss writes an RSS representation of this feed to the writer.
|
|
|
|
|
func (f *Feed) WriteRss(w io.Writer) error { |
|
|
|
|
return WriteXML(&Rss{f}, w) |
|
|
|
|
} |
|
|
|
|