package main import ( "context" "os/signal" "syscall" ) func main() { ctx, cancel := signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM) defer cancel() app := newApp(ctx, settings()) go app.Serve(ctx) app.Wait() }