fix parse files
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Владимир Фёдоров 2024-05-24 02:15:00 +07:00
parent e4741d5de2
commit 20a2f975fd
1 changed files with 3 additions and 2 deletions

View File

@ -15,6 +15,7 @@ import (
"net/http" "net/http"
"os" "os"
"strconv" "strconv"
"strings"
) )
func main() { func main() {
@ -26,13 +27,13 @@ func main() {
if err != nil { if err != nil {
panic(err) panic(err)
} }
token := string(tokenData) token := strings.TrimSpace(string(tokenData))
chatIdData, err := os.ReadFile("resources/telegram_order_chat_id.txt") chatIdData, err := os.ReadFile("resources/telegram_order_chat_id.txt")
if err != nil { if err != nil {
panic(err) panic(err)
} }
chatID, err := strconv.ParseInt(string(chatIdData), 10, 64) chatID, err := strconv.ParseInt(strings.TrimSpace(string(chatIdData)), 10, 64)
if err != nil { if err != nil {
panic(err) panic(err)
} }