mirror of
https://github.com/foomo/keel.git
synced 2025-10-16 12:35:34 +00:00
15 lines
230 B
Go
15 lines
230 B
Go
package service_test
|
|
|
|
import (
|
|
"syscall"
|
|
"time"
|
|
)
|
|
|
|
// shutdown example after the given time
|
|
func shutdown(duration time.Duration) {
|
|
go func() {
|
|
time.Sleep(duration)
|
|
_ = syscall.Kill(syscall.Getpid(), syscall.SIGINT)
|
|
}()
|
|
}
|