17 lines
185 B
Go
17 lines
185 B
Go
package utils
|
|
|
|
import (
|
|
"os"
|
|
"os/signal"
|
|
"syscall"
|
|
)
|
|
|
|
func Wait() {
|
|
c := make(chan os.Signal, 1)
|
|
signal.Notify(c, os.Interrupt, syscall.SIGTERM)
|
|
select {
|
|
case <-c:
|
|
return
|
|
}
|
|
}
|