package cli import ( "context" "os" "os/signal" "syscall" ) // newSignalContext returns a context that is cancelled on SIGINT or SIGTERM, // so that Ctrl-C and systemctl stop both trigger a clean shutdown. func newSignalContext() (context.Context, context.CancelFunc) { return signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM) }