keel/service/helper_test.go
Kevin Franklin Kim 07f0c394d5
feat: add GoRoutine service
moves all services into the service package
2023-09-08 12:17:23 +02:00

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)
}()
}