From 28f6944ce6d413801b703767c12f9b929e4aca81 Mon Sep 17 00:00:00 2001 From: iyear Date: Thu, 1 Sep 2022 15:28:18 +0800 Subject: [PATCH] refactor(cmd): NA --- cmd/root.go | 4 ++-- docs/command/tdl.md | 2 ++ docs/command/tdl_login.md | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/cmd/root.go b/cmd/root.go index fd85595..fe5f794 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -1,6 +1,7 @@ package cmd import ( + "fmt" "github.com/fatih/color" "github.com/iyear/tdl/cmd/login" "github.com/iyear/tdl/cmd/version" @@ -25,8 +26,7 @@ func init() { cmd.PersistentFlags().StringP("ns", "n", "", "namespace") if err := doc.GenMarkdownTree(cmd, filepath.Join(consts.DocsPath, "command")); err != nil { - color.Red("generate cmd docs failed: %v", err) - return + panic(fmt.Errorf("generate cmd docs failed: %v", err)) } } diff --git a/docs/command/tdl.md b/docs/command/tdl.md index cb6bc28..76d1ab1 100644 --- a/docs/command/tdl.md +++ b/docs/command/tdl.md @@ -12,10 +12,12 @@ tdl -h ``` -h, --help help for tdl + -n, --ns string namespace --proxy string ``` ### SEE ALSO * [tdl login](tdl_login.md) - Login to Telegram +* [tdl version](tdl_version.md) - Check the version info diff --git a/docs/command/tdl_login.md b/docs/command/tdl_login.md index cac1227..e1455c5 100644 --- a/docs/command/tdl_login.md +++ b/docs/command/tdl_login.md @@ -15,13 +15,13 @@ tdl login ### Options ``` - -h, --help help for login - -n, --ns string namespace + -h, --help help for login ``` ### Options inherited from parent commands ``` + -n, --ns string namespace --proxy string ```