From d38f5d8bc65c1ca95a8a1cca71007c6ea88495f2 Mon Sep 17 00:00:00 2001 From: Feng_Qi Date: Thu, 15 Mar 2018 17:25:09 +0800 Subject: [PATCH] update use description --- cmd/auth.go | 7 ++----- cmd/search.go | 10 +++------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/cmd/auth.go b/cmd/auth.go index df1a5af..6287b23 100644 --- a/cmd/auth.go +++ b/cmd/auth.go @@ -18,7 +18,6 @@ func init() { var authCmd = &cobra.Command{ Use: "auth", Short: "Auth Test", - Long: `Usage: ldap-test-tool auth [command]`, Args: cobra.OnlyValidArgs, ValidArgs: []string{authUserCmd.Use, authMultiCmd.Use}, Run: func(cmd *cobra.Command, args []string) { @@ -30,9 +29,8 @@ var authCmd = &cobra.Command{ } var authUserCmd = &cobra.Command{ - Use: "single", + Use: "single [username] [password]", Short: "Single Auth Test", - Long: `Usage: ldap-test-tool auth single [username] [password]`, Args: cobra.ExactArgs(2), Run: func(cmd *cobra.Command, args []string) { action := "Auth" @@ -56,9 +54,8 @@ var authUserCmd = &cobra.Command{ } var authMultiCmd = &cobra.Command{ - Use: "multi", + Use: "multi [filename]", Short: "Multi Auth Test", - Long: `Usage: ldap-test-tool auth multi [filename]`, Args: cobra.ExactArgs(1), Run: func(cmd *cobra.Command, args []string) { action := "Multi Auth" diff --git a/cmd/search.go b/cmd/search.go index 9191300..f609c40 100644 --- a/cmd/search.go +++ b/cmd/search.go @@ -23,7 +23,6 @@ func init() { var searchCmd = &cobra.Command{ Use: "search", Short: "Search Test", - Long: `Usage: ldap-test-tool search [command]`, Args: cobra.OnlyValidArgs, ValidArgs: []string{searchUserCmd.Use, searchFilterCmd.Use, searchMultiCmd.Use}, Run: func(cmd *cobra.Command, args []string) { @@ -36,9 +35,8 @@ var searchCmd = &cobra.Command{ } var searchUserCmd = &cobra.Command{ - Use: "user", + Use: "user [username]", Short: "Search Single User", - Long: `Usage: ldap-test-tool search user [username]`, Args: cobra.ExactArgs(1), Run: func(cmd *cobra.Command, args []string) { action := "Search" @@ -61,9 +59,8 @@ var searchUserCmd = &cobra.Command{ } var searchMultiCmd = &cobra.Command{ - Use: "multi", + Use: "multi [filename]", Short: "Search Multi Users", - Long: `Usage: ldap-test-tool search multi [filename]`, Args: cobra.ExactArgs(1), Run: func(cmd *cobra.Command, args []string) { action := "Multi Search" @@ -119,9 +116,8 @@ var searchMultiCmd = &cobra.Command{ } var searchFilterCmd = &cobra.Command{ - Use: "filter", + Use: "filter [searchFilter]", Short: "Search By Filter", - Long: `Usage: ldap-test-tool search filter [searchFilter]`, Args: cobra.ExactArgs(1), Run: func(cmd *cobra.Command, args []string) { action := "Search By Filter"