From efac11a3ef6bec9ba15feb9fa867e77567fcb6aa Mon Sep 17 00:00:00 2001 From: Maik Brenke Date: Fri, 18 Jun 2021 10:44:10 +0200 Subject: [PATCH 1/2] fix: use strconv.ParseInt instead of strconv.Atoi --- service/telegram/telegram.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service/telegram/telegram.go b/service/telegram/telegram.go index ecd5c21..502b734 100644 --- a/service/telegram/telegram.go +++ b/service/telegram/telegram.go @@ -78,7 +78,7 @@ All configuration options are also available via environment variables.`, if len(v) <= 0 { return helpers.ErrChannel } - k, errStr := strconv.Atoi(v) + k, errStr := strconv.ParseInt(v, 10, 64) if errStr != nil { return errStr } From 76105ec7ad55f00708edba52aa58600e15eeb6c4 Mon Sep 17 00:00:00 2001 From: Maik Brenke Date: Mon, 21 Jun 2021 11:55:26 +0200 Subject: [PATCH 2/2] fix type cast after string conversation --- service/telegram/telegram.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service/telegram/telegram.go b/service/telegram/telegram.go index 502b734..79fbd99 100644 --- a/service/telegram/telegram.go +++ b/service/telegram/telegram.go @@ -82,7 +82,7 @@ All configuration options are also available via environment variables.`, if errStr != nil { return errStr } - telegramSvc.AddReceivers(int64(k)) + telegramSvc.AddReceivers(k) } notifier.UseServices(telegramSvc)