fix parse files
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
e4741d5de2
commit
20a2f975fd
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue