Skip to content

Commit

Permalink
go: closes #31
Browse files Browse the repository at this point in the history
  • Loading branch information
azimut committed Apr 1, 2024
1 parent fb12767 commit be8e7cc
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions backend/src/main.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
package main

import (
"fmt"
"os"
)
import "fmt"

func main() {

Expand All @@ -12,15 +9,24 @@ func main() {
panic(err)
}

fmt.Println("Starting RSS feeds fetch...")
for i := range feeds {
if err := feeds[i].Fetch(); err != nil {
fmt.Fprintf(
os.Stderr,
"processing of url (%s) failed (%v)\n",
err := feeds[i].Fetch()
if err == nil {
fmt.Printf(
"[%02d/%02d] success (%s)\n",
i+1,
len(feeds),
feeds[i].Url,
)
} else {
fmt.Printf(
"[%02d/%02d] failure (%s) with error (%v)\n",
i+1,
len(feeds),
feeds[i].Url,
err,
)
continue
}
}

Expand Down

0 comments on commit be8e7cc

Please sign in to comment.