code: func CancelOnInterrupt(ctx context.Context, f context.CancelFunc) {
  	c := make(chan os.Signal, 1)
  	signal.Notify(c, os.Interrupt, syscall.SIGTERM)
  	go func() {
  		select {
  		case <-ctx.Done():
  		case <-c:
  			f()
  		}
  	}()
  }
docs: // CancelOnInterrupt calls f when os.Interrupt or SIGTERM is received.
  // It ignores subsequent interrupts on purpose - program should exit correctly after the first signal.