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 ```