@@ -22,7 +22,7 @@ var atomOutput = `<?xml version="1.0" encoding="UTF-8"?><feed xmlns="http://www.
2222 <updated>2013-01-16T21:52:35-05:00</updated>
2323 <id>tag:jmoiron.net,2013-01-16:/blog/limiting-concurrency-in-go/</id>
2424 <content type="html">A discussion on controlled parallelism in golang</content>
25- <link href="http://jmoiron.net/blog/limiting-concurrency-in-go/"></link>
25+ <link href="http://jmoiron.net/blog/limiting-concurrency-in-go/" rel="alternate" ></link>
2626 <author>
2727 <name>Jason Moiron</name>
2828@@ -33,28 +33,30 @@ var atomOutput = `<?xml version="1.0" encoding="UTF-8"?><feed xmlns="http://www.
3333 <updated>2013-01-16T21:52:35-05:00</updated>
3434 <id>tag:jmoiron.net,2013-01-16:/blog/logicless-template-redux/</id>
3535 <content type="html">More thoughts on logicless templates</content>
36- <link href="http://jmoiron.net/blog/logicless-template-redux/"></link>
36+ <link href="http://jmoiron.net/blog/logicless-template-redux/" rel="alternate" ></link>
3737 </entry>
3838 <entry>
3939 <title>Idiomatic Code Reuse in Go</title>
4040 <updated>2013-01-16T21:52:35-05:00</updated>
4141 <id>tag:jmoiron.net,2013-01-16:/blog/idiomatic-code-reuse-in-go/</id>
4242 <content type="html">How to use interfaces <em>effectively</em></content>
43- <link href="http://jmoiron.net/blog/idiomatic-code-reuse-in-go/"></link>
43+ <link href="http://jmoiron.net/blog/idiomatic-code-reuse-in-go/" rel="alternate"></link>
44+ <link href="http://example.com/cover.jpg" rel="enclosure" type="image/jpg" length="123456"></link>
4445 </entry>
4546 <entry>
4647 <title>Never Gonna Give You Up Mp3</title>
4748 <updated>2013-01-16T21:52:35-05:00</updated>
4849 <id>tag:example.com,2013-01-16:/RickRoll.mp3</id>
4950 <content type="html">Never gonna give you up - Never gonna let you down.</content>
51+ <link href="http://example.com/RickRoll.mp3" rel="alternate"></link>
5052 <link href="http://example.com/RickRoll.mp3" rel="enclosure" type="audio/mpeg" length="123456"></link>
5153 </entry>
5254 <entry>
5355 <title>String formatting in Go</title>
5456 <updated>2013-01-16T21:52:35-05:00</updated>
5557 <id>tag:example.com,2013-01-16:/strings</id>
5658 <content type="html">How to use things like %s, %v, %d, etc.</content>
57- <link href="http://example.com/strings"></link>
59+ <link href="http://example.com/strings" rel="alternate" ></link>
5860 </entry>
5961</feed>`
6062
@@ -83,6 +85,7 @@ var rssOutput = `<?xml version="1.0" encoding="UTF-8"?><rss version="2.0">
8385 <title>Idiomatic Code Reuse in Go</title>
8486 <link>http://jmoiron.net/blog/idiomatic-code-reuse-in-go/</link>
8587 <description>How to use interfaces <em>effectively</em></description>
88+ <enclosure url="http://example.com/cover.jpg" length="123456" type="image/jpg"></enclosure>
8689 <pubDate>Wed, 16 Jan 2013 21:52:35 -0500</pubDate>
8790 </item>
8891 <item>
@@ -132,6 +135,7 @@ var jsonOutput = `{
132135 "url": "http://jmoiron.net/blog/idiomatic-code-reuse-in-go/",
133136 "title": "Idiomatic Code Reuse in Go",
134137 "summary": "How to use interfaces \u003cem\u003eeffectively\u003c/em\u003e",
138+ "image": "http://example.com/cover.jpg",
135139 "date_published": "2013-01-16T21:52:35-05:00"
136140 },
137141 {
@@ -186,11 +190,13 @@ func TestFeed(t *testing.T) {
186190 Title : "Idiomatic Code Reuse in Go" ,
187191 Link : & Link {Href : "http://jmoiron.net/blog/idiomatic-code-reuse-in-go/" },
188192 Description : "How to use interfaces <em>effectively</em>" ,
193+ Enclosure : & Enclosure {Url : "http://example.com/cover.jpg" , Length : "123456" , Type : "image/jpg" },
189194 Created : now ,
190195 },
191196 {
192197 Title : "Never Gonna Give You Up Mp3" ,
193- Link : & Link {Href : "http://example.com/RickRoll.mp3" , Length : "123456" , Type : "audio/mpeg" },
198+ Link : & Link {Href : "http://example.com/RickRoll.mp3" },
199+ Enclosure : & Enclosure {Url : "http://example.com/RickRoll.mp3" , Length : "123456" , Type : "audio/mpeg" },
194200 Description : "Never gonna give you up - Never gonna let you down." ,
195201 Created : now ,
196202 },
0 commit comments