summaryrefslogtreecommitdiff
path: root/main.go
blob: 017772e8226dc2c43acaa47f09aa7321323864d1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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)
	}
}