From 20a2f975fd4449fcabf6be8e30e85458aff6819e Mon Sep 17 00:00:00 2001 From: Fedorov Vladimir Date: Fri, 24 May 2024 02:15:00 +0700 Subject: [PATCH] fix parse files --- cmd/cake_crm/main.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/cake_crm/main.go b/cmd/cake_crm/main.go index 4cad0bc..1de898c 100644 --- a/cmd/cake_crm/main.go +++ b/cmd/cake_crm/main.go @@ -15,6 +15,7 @@ import ( "net/http" "os" "strconv" + "strings" ) func main() { @@ -26,13 +27,13 @@ func main() { if err != nil { panic(err) } - token := string(tokenData) + token := strings.TrimSpace(string(tokenData)) chatIdData, err := os.ReadFile("resources/telegram_order_chat_id.txt") if err != nil { panic(err) } - chatID, err := strconv.ParseInt(string(chatIdData), 10, 64) + chatID, err := strconv.ParseInt(strings.TrimSpace(string(chatIdData)), 10, 64) if err != nil { panic(err) }