package service import ( "context" "os" ) // WaitForStop blocks until the context is cancelled or a signal is received. // It accepts a channel so shutdown behavior can be tested without sending a real OS signal. func WaitForStop(ctx context.Context, signals <-chan os.Signal) { select { case <-ctx.Done(): case <-signals: } }