2023-10-11 17:04:49 +02:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
ConfigMain "github.com/ManyakRus/starter/config"
|
2023-10-12 16:47:11 +02:00
|
|
|
"github.com/ManyakRus/starter/stopapp"
|
2023-10-11 17:04:49 +02:00
|
|
|
"github.com/ManyakRus/starter/telegram_client"
|
|
|
|
"github.com/ManyakRus/telegram_loki/internal/config"
|
2023-10-13 12:28:49 +02:00
|
|
|
"github.com/ManyakRus/telegram_loki/internal/logic"
|
2023-10-11 17:04:49 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
StartApp()
|
|
|
|
}
|
|
|
|
|
|
|
|
func StartApp() {
|
|
|
|
ConfigMain.LoadEnv()
|
|
|
|
config.FillSettings()
|
|
|
|
|
2023-10-12 16:47:11 +02:00
|
|
|
stopapp.StartWaitStop()
|
|
|
|
|
|
|
|
telegram_client.CreateTelegramClient(nil)
|
2023-10-11 17:04:49 +02:00
|
|
|
telegram_client.ConnectTelegram()
|
2023-10-12 16:47:11 +02:00
|
|
|
|
2023-10-13 12:28:49 +02:00
|
|
|
logic.Start()
|
|
|
|
|
2023-10-12 16:47:11 +02:00
|
|
|
stopapp.GetWaitGroup_Main().Wait()
|
2023-10-11 17:04:49 +02:00
|
|
|
}
|