blob: 2cf2c15b8deac8e8a98c9f3893ab8ffbf627c4dc (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
package main
import (
"context"
"log/slog"
"os"
"os/signal"
"gitrepo.ru/neonxp/track/pkg/app"
)
func main() {
ctx, cancel := signal.NotifyContext(context.Background(), os.Interrupt, os.Kill)
defer cancel()
if err := app.App(ctx); err != nil {
slog.ErrorContext(ctx, "error", slog.Any("error", err))
os.Exit(1)
}
}
|