From 76198fdfb02ac4608f4679cf17dd32642cc14822 Mon Sep 17 00:00:00 2001 From: Paul Petring Date: Sun, 12 Jul 2015 02:49:30 +0200 Subject: [PATCH] fixing string encoding issue in rss enclosure length attribute --- rss.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rss.go b/rss.go index 202278f..79364bd 100644 --- a/rss.go +++ b/rss.go @@ -76,7 +76,7 @@ type RssEnclosure struct { //RSS 2.0 XMLName xml.Name `xml:"enclosure"` Url string `xml:"url,attr"` - Length string `xml:"length,attr"` + Length int64 `xml:"length,attr"` Type string `xml:"type,attr"` } @@ -91,7 +91,7 @@ func newRssItem(i *Item) *RssItem { Link: i.Link.Href, Description: i.Description, Guid: i.Id, - Enclosure: &RssEnclosure{Url: i.Link.Href, Type: i.Link.Type, Length: string(i.Link.Length)}, + Enclosure: &RssEnclosure{Url: i.Link.Href, Type: i.Link.Type, Length: i.Link.Length}, PubDate: anyTimeFormat(time.RFC822, i.Created, i.Updated), } if i.Author != nil {