From 12ef16cbeef97b58a5e660230eaa84ceb80afdbc Mon Sep 17 00:00:00 2001 From: Alexander NeonXP Kiryukhin Date: Thu, 27 Jun 2024 02:20:00 +0300 Subject: first commit --- main.go | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 main.go (limited to 'main.go') diff --git a/main.go b/main.go new file mode 100644 index 0000000..017772e --- /dev/null +++ b/main.go @@ -0,0 +1,28 @@ +package main + +import ( + "context" + "os" + "os/signal" + + "gitrepo.ru/neonxp/rss2world/app" +) + +func main() { + ctx, cancel := signal.NotifyContext(context.Background(), os.Interrupt, os.Kill) + defer cancel() + + cfg, err := app.NewConfig() + if err != nil { + panic(err) + } + + a, err := app.New(cfg) + if err != nil { + panic(err) + } + + if err := a.Run(ctx); err != nil { + panic(err) + } +} -- cgit v1.2.3