Skip to content
This repository was archived by the owner on Oct 8, 2023. It is now read-only.

Commit b1b18ca

Browse files
committed
Add comments for all exported symbols
1 parent 938fee8 commit b1b18ca

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

pkg/epidator/epidator.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package epidator
22

3+
// GetEpisodeDetails provides the corresponding episode details for the `trackName` provided according to the features defined in `podcastYAML`.
34
func GetEpisodeDetails(trackName, podcastYAML string) (map[string]interface{}, error) {
45
podcast, err := NewPodcast(trackName, podcastYAML)
56
if err != nil {

pkg/epidator/podcast.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,10 @@ import (
1717
"gopkg.in/yaml.v2"
1818
)
1919

20+
// GetPubDate returns the `time.Time` value for current publication.
2021
var GetPubDate = time.Now
2122

23+
// GetFeed returns the content of the XML feed defined in `URL`, or an error.
2224
var GetFeed = func(URL string) (string, error) {
2325
resp, err := http.Get(URL)
2426
if err != nil {
@@ -34,6 +36,7 @@ var GetFeed = func(URL string) (string, error) {
3436
return string(bodyBytes), nil
3537
}
3638

39+
// GetScript returns the content of the script which name matches the `episodeTag` in HTML, or an error.
3740
var GetScript = func(episodeTag string) (string, error) {
3841
q := fmt.Sprintf("name contains '%v'", episodeTag)
3942

@@ -63,6 +66,7 @@ var GetScript = func(episodeTag string) (string, error) {
6366
return content, nil
6467
}
6568

69+
// Podcast contains all the parameters to get the episode details for a podcast.
6670
type Podcast struct {
6771
FeedURL string `yaml:"feedURL"`
6872
MasterURLPattern string `yaml:"masterURLPattern"`
@@ -85,6 +89,7 @@ type Podcast struct {
8589
details map[string]interface{}
8690
}
8791

92+
// NewPodcast constructs the `Podcast` object for a `trackName` according with the properties defined in the `YAMLFile`, or an error.
8893
func NewPodcast(trackName, YAMLFile string) (*Podcast, error) {
8994
f, err := ioutil.ReadFile(YAMLFile)
9095
if err != nil {

0 commit comments

Comments
 (0)