track/main.go

22 lines
332 B
Go
Raw Normal View History

2024-08-18 13:29:54 +03:00
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)
}
}