Golang Studown
Nov 19, 2020
·
1 min read
func StudownWait(hook func()) {
sign := make(chan os.Signal)
signal.Notify(sign, os.Interrupt, os.Kill)
<-sign
if hook != nil {
hook()
}
}
func StudownWait(hook func()) {
sign := make(chan os.Signal)
signal.Notify(sign, os.Interrupt, os.Kill)
<-sign
if hook != nil {
hook()
}
}