From b23d82376cc5b295c29948555094086401145dae Mon Sep 17 00:00:00 2001 From: HeshamTB Date: Sun, 4 Aug 2024 16:42:18 +0300 Subject: [PATCH] yttopodcast: only print errors on genfeed Signed-off-by: HeshamTB --- cmd/yttopodcast/main.go | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/cmd/yttopodcast/main.go b/cmd/yttopodcast/main.go index e9e0961..714bf22 100644 --- a/cmd/yttopodcast/main.go +++ b/cmd/yttopodcast/main.go @@ -1,20 +1,21 @@ package main import ( - "context" - "flag" - "fmt" - "io" - "log" - "net/http" - "os" - "os/signal" - "strings" - "time" + "context" + "errors" + "flag" + "fmt" + "io" + "log" + "net/http" + "os" + "os/signal" + "strings" + "time" - "gitea.hbanafa.com/hesham/yttopodcast/bouncer" - "gitea.hbanafa.com/hesham/yttopodcast/dylinkprovider" - "gitea.hbanafa.com/hesham/yttopodcast/feed" + "gitea.hbanafa.com/hesham/yttopodcast/bouncer" + "gitea.hbanafa.com/hesham/yttopodcast/dylinkprovider" + "gitea.hbanafa.com/hesham/yttopodcast/feed" ) var ( @@ -134,10 +135,9 @@ func main() { func genFeeds(ids []string) { for _, id := range ids { - l.Printf("[feed] generating feed for %s\n", id) err := genFeed(id) if err != nil { - l.Printf(err.Error()) + l.Printf(fmt.Errorf("failed to generate feed for %s %v:", id, err).Error()) continue } }