-
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* fixes #3, removing override, adding clear documentation and changing api name * adding Item.AddDuration, adding test coverage * bumping version to 1.3.0
- Loading branch information
1 parent
4c753cf
commit b288862
Showing
10 changed files
with
142 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
profile.out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,7 +76,7 @@ func Example_httpHandlers() { | |
// <title>eduncan911 Podcasts</title> | ||
// <link>http://eduncan911.com/</link> | ||
// <description>An example Podcast</description> | ||
// <generator>go podcast v1.2.1 (github.com/eduncan911/podcast)</generator> | ||
// <generator>go podcast v1.3.0 (github.com/eduncan911/podcast)</generator> | ||
// <language>en-us</language> | ||
// <lastBuildDate>Mon, 06 Feb 2017 08:21:52 +0000</lastBuildDate> | ||
// <managingEditor>[email protected] (Jane Doe)</managingEditor> | ||
|
@@ -97,7 +97,6 @@ func Example_httpHandlers() { | |
// <itunes:author>[email protected] (Jane Doe)</itunes:author> | ||
// <itunes:summary><![CDATA[item <a href="http://example.com">example.com</a>]]></itunes:summary> | ||
// <itunes:image href="http://example.com/episode-1.png"></itunes:image> | ||
// <itunes:duration>110</itunes:duration> | ||
// </item> | ||
// <item> | ||
// <guid>http://e.com/2.mp3</guid> | ||
|
@@ -109,7 +108,6 @@ func Example_httpHandlers() { | |
// <itunes:author>[email protected] (Jane Doe)</itunes:author> | ||
// <itunes:summary><![CDATA[item <a href="http://example.com">example.com</a>]]></itunes:summary> | ||
// <itunes:image href="http://example.com/episode-2.png"></itunes:image> | ||
// <itunes:duration>165</itunes:duration> | ||
// </item> | ||
// </channel> | ||
// </rss> | ||
|
@@ -165,7 +163,7 @@ func Example_ioWriter() { | |
// <title>Sample Podcasts</title> | ||
// <link>http://example.com/</link> | ||
// <description>An example Podcast</description> | ||
// <generator>go podcast v1.2.1 (github.com/eduncan911/podcast)</generator> | ||
// <generator>go podcast v1.3.0 (github.com/eduncan911/podcast)</generator> | ||
// <language>en-us</language> | ||
// <lastBuildDate>Mon, 06 Feb 2017 08:21:52 +0000</lastBuildDate> | ||
// <managingEditor>[email protected] (Jane Doe)</managingEditor> | ||
|
@@ -188,7 +186,6 @@ func Example_ioWriter() { | |
// <itunes:subtitle>A simple episode 9</itunes:subtitle> | ||
// <itunes:summary><![CDATA[item k <a href="http://example.com">example.com</a>]]></itunes:summary> | ||
// <itunes:image href="http://example.com/episode-9.png"></itunes:image> | ||
// <itunes:duration>550</itunes:duration> | ||
// </item> | ||
// <item> | ||
// <guid>http://example.com/10.mp3</guid> | ||
|
@@ -201,7 +198,6 @@ func Example_ioWriter() { | |
// <itunes:subtitle>A simple episode 10</itunes:subtitle> | ||
// <itunes:summary><![CDATA[item k <a href="http://example.com">example.com</a>]]></itunes:summary> | ||
// <itunes:image href="http://example.com/episode-10.png"></itunes:image> | ||
// <itunes:duration>605</itunes:duration> | ||
// </item> | ||
// </channel> | ||
// </rss> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -100,7 +100,7 @@ func ExamplePodcast_AddItem() { | |
pp.IAuthor, pp.IDuration, pp.IExplicit, pp.IIsClosedCaptioned, | ||
pp.IOrder, pp.ISubtitle, pp.ISummary) | ||
// Output: | ||
// http://example.com/1.mp3 Episode 1 http://example.com/1.mp3 Description for Episode 1 &{{ } [email protected] (the name)} 2017-04-22 08:21:52 +0000 UTC Sat, 22 Apr 2017 08:21:52 +0000 {{ } http://example.com/1.mp3 183 183 audio/mpeg audio/mpeg} [email protected] (the name) 183 A simple episode 1 &{{ } See more at <a href="http://example.com">Here</a>} | ||
// http://example.com/1.mp3 Episode 1 http://example.com/1.mp3 Description for Episode 1 &{{ } [email protected] (the name)} 2017-04-22 08:21:52 +0000 UTC Sat, 22 Apr 2017 08:21:52 +0000 {{ } http://example.com/1.mp3 183 183 audio/mpeg audio/mpeg} [email protected] (the name) A simple episode 1 &{{ } See more at <a href="http://example.com">Here</a>} | ||
} | ||
|
||
func ExamplePodcast_AddLastBuildDate() { | ||
|
@@ -183,7 +183,7 @@ See more at our website: <a href="http://example.com">example.com</a> | |
// <title>eduncan911 Podcasts</title> | ||
// <link>http://eduncan911.com/</link> | ||
// <description>An example Podcast</description> | ||
// <generator>go podcast v1.2.1 (github.com/eduncan911/podcast)</generator> | ||
// <generator>go podcast v1.3.0 (github.com/eduncan911/podcast)</generator> | ||
// <language>en-us</language> | ||
// <lastBuildDate>Mon, 06 Feb 2017 08:21:52 +0000</lastBuildDate> | ||
// <managingEditor>[email protected] (Jane Doe)</managingEditor> | ||
|
@@ -240,3 +240,19 @@ func ExampleItem_AddPubDate() { | |
// Tue, 24 Jan 2017 08:21:52 +0000 2017-01-24 08:21:52 +0000 UTC | ||
// Tue, 24 Jan 2017 08:21:52 +0000 2017-01-24 08:21:52 +0000 UTC | ||
} | ||
|
||
func ExampleItem_AddDuration() { | ||
i := podcast.Item{ | ||
Title: "item title", | ||
Description: "item desc", | ||
Link: "item link", | ||
} | ||
d := int64(533) | ||
|
||
// add the Duration in Seconds | ||
i.AddDuration(d) | ||
|
||
fmt.Println(i.IDuration) | ||
// Output: | ||
// 533 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters