29 lines
380 B
Go
29 lines
380 B
Go
|
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)
|
||
|
}
|
||
|
}
|