Added content to item
This commit is contained in:
		
							
								
								
									
										45
									
								
								rss.go
									
									
									
									
									
								
							
							
						
						
									
										45
									
								
								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,42 +35,48 @@ 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"`
 | 
			
		||||
	Guid        string `xml:"guid,omitempty"`
 | 
			
		||||
	PubDate     string `xml:"pubDate,omitempty"`
 | 
			
		||||
	Source      *Source
 | 
			
		||||
	Content     *Content
 | 
			
		||||
	Categories  []string `xml:"category,omitempty"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
type Channel struct {
 | 
			
		||||
	XMLName        xml.Name  `xml:"channel"`
 | 
			
		||||
	Title          string    `xml:"title"`
 | 
			
		||||
	Link           string    `xml:"link"`
 | 
			
		||||
	Description    string    `xml:"description"`
 | 
			
		||||
	Language       string    `xml:"language,omitempty"`
 | 
			
		||||
	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"`
 | 
			
		||||
	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"`
 | 
			
		||||
	XMLName        xml.Name `xml:"channel"`
 | 
			
		||||
	Title          string   `xml:"title"`
 | 
			
		||||
	Link           string   `xml:"link"`
 | 
			
		||||
	Description    string   `xml:"description"`
 | 
			
		||||
	Language       string   `xml:"language,omitempty"`
 | 
			
		||||
	Copyright      string   `xml:"copyright,omitempty"`
 | 
			
		||||
	ManagingEditor string   `xml:"managingEditor,omitempty"`
 | 
			
		||||
	WebMaster      string   `xml:"webMaster,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"`
 | 
			
		||||
	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 {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user