24 lines
357 B
Go
24 lines
357 B
Go
package main
|
|
|
|
import (
|
|
"context"
|
|
"loveuer/utodo/internal/cmd"
|
|
"loveuer/utodo/internal/opt"
|
|
"os/signal"
|
|
"syscall"
|
|
"time"
|
|
)
|
|
|
|
func init() {
|
|
time.Local = time.FixedZone("CST", 8*3600)
|
|
}
|
|
|
|
func main() {
|
|
ctx, cancel := signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM)
|
|
defer cancel()
|
|
|
|
opt.Init()
|
|
cmd.Init()
|
|
cmd.Execute(ctx)
|
|
}
|