jira-bot/pkg/utils/wait.go

17 lines
185 B
Go
Raw Permalink Normal View History

2021-06-06 03:46:11 +03:00
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
}
}