From ac79d420579efabb93e4decd587d7186964abc52 Mon Sep 17 00:00:00 2001 From: Alexander NeonXP Kiryukhin Date: Sat, 13 Jul 2024 22:01:10 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D0=BF=D1=80=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D0=BB=20=D0=BF=D0=B0=D0=BD=D0=B8=D0=BA=D1=83=20=D0=BF=D1=80?= =?UTF-8?q?=D0=B8=20=D0=BE=D1=88=D0=B8=D0=B1=D0=BA=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/app.go | 3 ++- templates/telegram.gotmpl | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/app.go b/app/app.go index 1ea0ee8..405a4e9 100644 --- a/app/app.go +++ b/app/app.go @@ -3,6 +3,7 @@ package app import ( "bytes" "context" + "log/slog" "os" "text/template" "time" @@ -44,7 +45,7 @@ func (a *App) Run(ctx context.Context) error { return nil case <-ticker.C: if err := a.iteration(); err != nil { - return err + slog.ErrorContext(ctx, "failed iteration", slog.Any("error", err)) } } } diff --git a/templates/telegram.gotmpl b/templates/telegram.gotmpl index 9e2b91a..7523fa4 100644 --- a/templates/telegram.gotmpl +++ b/templates/telegram.gotmpl @@ -2,4 +2,6 @@ Новый пост в блоге Уголок NeonXP: {{.Title}} + +Отправлено через rss2world {{end}} \ No newline at end of file