summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorAlexander NeonXP Kiryukhin <i@neonxp.ru>2024-06-27 02:20:00 +0300
committerAlexander NeonXP Kiryukhin <i@neonxp.ru>2024-06-27 02:20:00 +0300
commit12ef16cbeef97b58a5e660230eaa84ceb80afdbc (patch)
treea4ca8b8a5ed07b8406467f1919e2d76fd44c7952 /main.go
first commit
Diffstat (limited to 'main.go')
-rw-r--r--main.go28
1 files changed, 28 insertions, 0 deletions
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)
+ }
+}