Added content to item
This commit is contained in:
parent
d1f684d63b
commit
9d8cc64645
19
rss.go
19
rss.go
@ -3,7 +3,6 @@ package rss
|
||||
import (
|
||||
"encoding/xml"
|
||||
"fmt"
|
||||
"time"
|
||||
)
|
||||
|
||||
type Image struct {
|
||||
@ -26,8 +25,8 @@ type TextInput struct {
|
||||
type Enclosure struct {
|
||||
XMLName xml.Name `xml:"enclosure"`
|
||||
Url string `xml:"url,attr"`
|
||||
Lenght int `xml:"lenght,attr"`
|
||||
Type string `xml:"type,attr"`
|
||||
Lenght int `xml:"lenght,attr"`
|
||||
}
|
||||
|
||||
type Source struct {
|
||||
@ -36,18 +35,24 @@ type Source struct {
|
||||
Value string
|
||||
}
|
||||
|
||||
type Content struct {
|
||||
XMLName xml.Name `xml:"content:encoded"`
|
||||
Value string `xml:",cdata"`
|
||||
}
|
||||
|
||||
type Item struct {
|
||||
XMLName xml.Name `xml:"item"`
|
||||
Title string `xml:"title,omitempty"`
|
||||
Link string `xml:"link,omitempty"`
|
||||
Description string `xml:"description,omitempty"`
|
||||
Author string `xml:"author,omitempty"`
|
||||
Categories []string `xml:"category,omitempty"`
|
||||
Comments string `xml:"comments,omitempty"`
|
||||
Enclosure *Enclosure
|
||||
Guid string `xml:"guid,omitempty"`
|
||||
PubDate time.Time `xml:"pubDate,omitempty"`
|
||||
PubDate string `xml:"pubDate,omitempty"`
|
||||
Source *Source
|
||||
Content *Content
|
||||
Categories []string `xml:"category,omitempty"`
|
||||
}
|
||||
|
||||
type Channel struct {
|
||||
@ -59,19 +64,19 @@ type Channel struct {
|
||||
Copyright string `xml:"copyright,omitempty"`
|
||||
ManagingEditor string `xml:"managingEditor,omitempty"`
|
||||
WebMaster string `xml:"webMaster,omitempty"`
|
||||
PubDate time.Time `xml:"pubDate,omitempty"`
|
||||
LastBuildDate time.Time `xml:"lastBuildDate,omitempty"`
|
||||
PubDate string `xml:"pubDate,omitempty"`
|
||||
LastBuildDate string `xml:"lastBuildDate,omitempty"`
|
||||
Categories []string `xml:"category,omitempty"`
|
||||
Generator string `xml:"generator,omitempty"`
|
||||
Docs string `xml:"docs,omitempty"`
|
||||
Cloud string `xml:"cloud,omitempty"`
|
||||
Ttl int `xml:"ttl,omitempty"`
|
||||
Image *Image
|
||||
Rating string `xml:"rating,omitempty"`
|
||||
TextInput *TextInput
|
||||
SkipHours []int `xml:"skipHours,omitempty"`
|
||||
SkipDays []int `xml:"skipDays,omitempty"`
|
||||
Items []*Item
|
||||
Ttl int `xml:"ttl,omitempty"`
|
||||
}
|
||||
|
||||
type Feed struct {
|
||||
|
Loading…
x
Reference in New Issue
Block a user