Add base setup

This commit is contained in:
2022-09-10 01:19:29 +02:00
commit b8fcd14ebe
9 changed files with 191 additions and 0 deletions

18
lifetime.go Normal file
View File

@@ -0,0 +1,18 @@
package curre
import (
"os"
"os/signal"
"syscall"
)
type Lifetime func() int
func ConsoleLifetime() int {
signals := make(chan os.Signal, 1)
signal.Notify(signals, syscall.SIGINT, syscall.SIGTERM)
<-signals
return OK
}