func Wrap(ctx context.Context, signals ...os.Signal) (context.Context, context.CancelFunc) {
	ctx, closer := context.WithCancel(ctx)
	c := make(chan os.Signal, 1)
	signal.Notify(c, signals...)
	go func() {
		select {
		case <-c:
			closer()
		case <-ctx.Done():
		}
	}()
	return ctx, closer
}
Wrap creates a new context that cancels on the given signals. It wraps the
provided context.
package signalcontext
import (
	"context"
	"os"
	"os/signal"
	"syscall"
)
func OnInterrupt() (context.Context, context.CancelFunc) {
	return Wrap(context.Background(), syscall.SIGINT, syscall.SIGTERM)
}
func On(signals ...os.Signal) (context.Context, context.CancelFunc) {
	return Wrap(context.Background(), signals...)
}