From 5266dca4322174f91f9617bad0bac44861d8fde8 Mon Sep 17 00:00:00 2001 From: abs3nt Date: Mon, 27 Feb 2023 23:13:56 -0800 Subject: [PATCH] simplify --- cmd/root.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cmd/root.go b/cmd/root.go index 15e9909..fa3e205 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -13,7 +13,7 @@ var ( from string to string rootCmd = &cobra.Command{ - Use: "converter", + Use: "converter FROM TO VALUE", Short: "A brief description of your application", Long: `A longer description that spans multiple lines and likely contains examples and usage of using your application. For example: @@ -55,3 +55,8 @@ func Execute() { os.Exit(1) } } + +func init() { + rootCmd.InitDefaultHelpFlag() + rootCmd.Flags().MarkHidden("help") +}