Skip to content

Commit

Permalink
update use description
Browse files Browse the repository at this point in the history
  • Loading branch information
freedomkk-qfeng committed Mar 15, 2018
1 parent 253098a commit d38f5d8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
7 changes: 2 additions & 5 deletions cmd/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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"
Expand All @@ -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"
Expand Down
10 changes: 3 additions & 7 deletions cmd/search.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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"
Expand All @@ -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"
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit d38f5d8

Please sign in to comment.