From c8758ff22d986a98e4959e99b6815be2dba23d7e Mon Sep 17 00:00:00 2001 From: Matthew Dawson Date: Sun, 7 Jul 2013 12:49:14 -0400 Subject: [PATCH] Add the author to the item in an rss feed. The author was missing from the generated rss feed's items. This adds it back, but only uses the name for now. --- feed_test.go | 1 + rss.go | 3 +++ 2 files changed, 4 insertions(+) diff --git a/feed_test.go b/feed_test.go index 99f0dd8..2794059 100644 --- a/feed_test.go +++ b/feed_test.go @@ -57,6 +57,7 @@ var rssOutput = ` Limiting Concurrency in Go http://jmoiron.net/blog/limiting-concurrency-in-go/ A discussion on controlled parallelism in golang + Jason Moiron 2013-01-16T21:52:35-05:00 diff --git a/rss.go b/rss.go index 651258f..2c8796f 100644 --- a/rss.go +++ b/rss.go @@ -92,6 +92,9 @@ func newRssItem(i *Item) *RssItem { Guid: i.Id, PubDate: anyTimeFormat(time.RFC3339, i.Created, i.Updated), } + if i.Author != nil { + item.Author = i.Author.Name + } return item }