tss/main.go

28 lines
557 B
Go
Raw Normal View History

2022-04-26 09:55:59 -04:00
package main
import (
2022-05-01 23:28:54 -04:00
"flag"
"go.balki.me/tss/app"
2022-06-20 16:13:06 -04:00
"go.balki.me/tss/db"
2022-06-12 18:46:16 -04:00
"go.balki.me/tss/log"
"go.balki.me/tss/schedule"
2022-06-20 16:13:06 -04:00
"go.balki.me/tss/telegram"
2022-04-26 09:55:59 -04:00
)
func main() {
2022-06-17 18:23:06 -04:00
logger := log.GetZapLogger()
2022-06-20 16:13:06 -04:00
db.SetLogger(logger.WithName("db"))
2022-06-17 18:23:06 -04:00
schedule.SetLogger(logger.WithName("schedule"))
2022-06-20 16:13:06 -04:00
telegram.SetLogger(logger.WithName("telegram"))
2022-06-17 18:23:06 -04:00
app.SetLogger(logger.WithName("app"))
2022-06-12 18:46:16 -04:00
2022-05-01 23:28:54 -04:00
var configPath string
flag.StringVar(&configPath, "config", "./tss.yml", "path to tss.yml config")
flag.Parse()
2022-06-17 17:51:16 -04:00
if err := app.Run(configPath); err != nil {
panic(err)
}
2022-04-26 09:55:59 -04:00
}