🎉: init project

This commit is contained in:
loveuer
2024-07-11 16:37:26 +08:00
commit c46458c6f2
159 changed files with 19246 additions and 0 deletions

22
main.go Normal file
View File

@@ -0,0 +1,22 @@
package main
import (
"context"
"github.com/loveuer/nf/nft/log"
"os/signal"
"syscall"
"ultone/internal/cmd"
"ultone/internal/tool"
)
func main() {
ctx, cancel := signal.NotifyContext(context.Background(), syscall.SIGHUP, syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT)
defer cancel()
if err := cmd.Execute(ctx); err != nil {
log.Error("cmd.Execute: err=%v", err)
}
log.Warn("received quit signal...(2s)")
<-tool.Timeout(2).Done()
}