diff options
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -0,0 +1,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) + } + +} |