go_telegram/cmd/main.go

20 lines
346 B
Go
Raw Normal View History

2020-01-21 19:38:02 +00:00
package main
import (
"log"
2020-05-17 06:25:29 +00:00
"github.com/mattburchett/go_telegram/pkg/core/config"
"github.com/mattburchett/go_telegram/pkg/service/telegram"
2020-01-21 19:38:02 +00:00
)
2020-01-22 20:51:26 +00:00
func main() {
2020-05-17 06:25:29 +00:00
conf, err := config.GetConfig("config.json")
2020-01-21 19:38:02 +00:00
if err != nil {
2020-01-22 20:51:26 +00:00
log.Fatal("Failed to read JSON.")
2020-01-21 19:38:02 +00:00
}
2020-05-17 06:25:29 +00:00
tgBot := telegram.Bot{}
tgBot.Config = conf
tgBot.New(conf.Telegram.Token)
2020-01-21 19:38:02 +00:00
}