22 lines
332 B
Go
22 lines
332 B
Go
|
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)
|
||
|
}
|
||
|
|
||
|
}
|