package main import ( "context" "fmt" "git.aiterp.net/lucifer/new-server/app/client" "log" "os" ) func handlerCmd( ctx context.Context, c client.Client, ) { cmd := parseCommand(os.Args[2:]) switch cmd.Name { case "list": handlers, err := c.GetHandlers(ctx, cmd.Params.Get(0).StringOr("all")) if err != nil { log.Fatalln(err) } WriteHandlerInfoTable(os.Stdout, handlers) default: if cmd.Name != "help" { log.Println("Unknown command:", cmd.Name) } _, _ = fmt.Fprintln(os.Stderr, helpString[1:]) } }