Files
tgbot/main.go
Archie Fox 7e94d8bd48 Init commit
2025-05-21 19:35:54 +03:00

28 lines
377 B
Go

package main
import (
"flag"
"log"
"tgbot/clients/telegram"
)
const (
tgBotHost = "api.telegram.org"
)
func main() {
tgClient = telegram.New(tgBotHost, mustToken())
}
func mustToken() string {
token := flag.String("token-bot-token", "", "token for access to telegram bot")
flag.Parse()
if *token == "" {
log.Fatal("token is not specified")
}
return *token
}