package main import ( "baize-demo/project/mono/application" DEATH "github.com/vrecan/death" "syscall" ) func main() { application.NewApp() defer application.DestroyApp() go func() { err := application.Start() if err != nil { panic(err) } }() defer func() { err := application.Finish() if err != nil { panic(err) } }() death := DEATH.NewDeath(syscall.SIGINT, syscall.SIGTERM) _ = death.WaitForDeath() }