nf/nft/nfctl/main.go

23 lines
363 B
Go
Raw Normal View History

2024-07-09 18:08:49 +08:00
package main
import (
"context"
"os/signal"
"syscall"
2024-12-26 19:40:39 +08:00
"time"
2024-12-16 22:50:51 +08:00
2024-12-26 19:40:39 +08:00
"github.com/loveuer/nf/nft/nfctl/internal/cmd"
2024-07-09 18:08:49 +08:00
)
2024-12-26 19:40:39 +08:00
func init() {
time.Local = time.FixedZone("CST", 8*3600)
cmd.Init()
}
2024-07-09 18:08:49 +08:00
func main() {
ctx, cancel := signal.NotifyContext(context.Background(), syscall.SIGHUP, syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT)
defer cancel()
2024-07-09 18:08:49 +08:00
2024-12-26 19:40:39 +08:00
cmd.Run(ctx)
2024-07-09 18:08:49 +08:00
}