RunUntilSignal stops the current goroutine execution and watches for SIGINT, SIGKILL and SIGHUP signals. Once spotted it continues the execution. This function is useful when you want to interact with e2e tests and manually decide when to finish.
()
| 91 | // RunUntilSignal stops the current goroutine execution and watches for SIGINT, SIGKILL and SIGHUP signals. Once spotted it continues |
| 92 | // the execution. This function is useful when you want to interact with e2e tests and manually decide when to finish. |
| 93 | func RunUntilSignal() { |
| 94 | s := make(chan os.Signal, 1) |
| 95 | signal.Notify(s, syscall.SIGINT, syscall.SIGTERM, syscall.SIGHUP) |
| 96 | |
| 97 | fmt.Println("Waiting for user SIGINT, SIGKILL or SIGHUP signal (Ctrl+C or IDE stop)") |
| 98 | <-s |
| 99 | } |
no outgoing calls
searching dependent graphs…