Skip to content

Commit 6c8bae0

Browse files
committed
Minor comment updates
1 parent 1bf2803 commit 6c8bae0

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

cmd_rss.go

+10-1
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,19 @@ is used in the format-string.
6262
// Process each specified feed.
6363
func (r *rssCommand) processFeed(url string) error {
6464

65+
// Create the parser with defaults
6566
fp := gofeed.NewParser()
67+
68+
// Parse the feed
6669
feed, err := fp.ParseURL(url)
6770
if err != nil {
6871
return err
6972
}
7073

74+
// For each entry
7175
for _, ent := range feed.Items {
76+
77+
// Get a piece of text, using our format-string
7278
txt := os.Expand(
7379
r.format,
7480
func(s string) string {
@@ -91,9 +97,12 @@ func (r *rssCommand) processFeed(url string) error {
9197
},
9298
)
9399

100+
// Now show it
94101
fmt.Println(txt)
95102
}
96-
return err
103+
104+
// All good.
105+
return nil
97106
}
98107

99108
// Execute is invoked if the user specifies `rss` as the subcommand.

0 commit comments

Comments
 (0)