tdl/main.go
2023-04-09 21:14:31 +08:00

20 lines
310 B
Go

package main
import (
"context"
"github.com/fatih/color"
"github.com/iyear/tdl/cmd"
"os"
"os/signal"
)
func main() {
ctx, cancel := signal.NotifyContext(context.Background(), os.Interrupt)
defer cancel()
if err := cmd.New().ExecuteContext(ctx); err != nil {
color.Red("%v", err)
os.Exit(1)
}
}