Skip to content

Commit

Permalink
fix: handle missing feed URL
Browse files Browse the repository at this point in the history
This commit adds a check to ensure that at least one feed URL is provided. If no URL is specified, it will log a fatal error message.
  • Loading branch information
NOBLES5E committed Aug 4, 2023
1 parent 6b6d8b5 commit 1105152
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions main.go
Expand Up @@ -55,6 +55,9 @@ func main() {
}

urls := c.Args().Slice()
if len(urls) == 0 {
log.Fatal("no feed url specified")
}
results := make(chan *gofeed.Item)

for _, url := range urls {
Expand Down

0 comments on commit 1105152

Please sign in to comment.