We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1bf2803 commit 6c8bae0Copy full SHA for 6c8bae0
cmd_rss.go
@@ -62,13 +62,19 @@ is used in the format-string.
62
// Process each specified feed.
63
func (r *rssCommand) processFeed(url string) error {
64
65
+ // Create the parser with defaults
66
fp := gofeed.NewParser()
67
+
68
+ // Parse the feed
69
feed, err := fp.ParseURL(url)
70
if err != nil {
71
return err
72
}
73
74
+ // For each entry
75
for _, ent := range feed.Items {
76
77
+ // Get a piece of text, using our format-string
78
txt := os.Expand(
79
r.format,
80
func(s string) string {
@@ -91,9 +97,12 @@ func (r *rssCommand) processFeed(url string) error {
91
97
},
92
98
)
93
99
100
+ // Now show it
94
101
fmt.Println(txt)
95
102
96
- return err
103
104
+ // All good.
105
+ return nil
106
107
108
// Execute is invoked if the user specifies `rss` as the subcommand.
0 commit comments