Browse Source

etcdctl/ctlv3: minor clean ups

- Fix typo
- Improve command ordering (elect should be below lock)
- Update migrate command description
Gyu-Ho Lee 9 years ago
parent
commit
80aa5978ca

+ 1 - 1
etcdctl/ctlv3/command/migrate_command.go

@@ -51,7 +51,7 @@ var (
 func NewMigrateCommand() *cobra.Command {
 func NewMigrateCommand() *cobra.Command {
 	mc := &cobra.Command{
 	mc := &cobra.Command{
 		Use:   "migrate",
 		Use:   "migrate",
-		Short: "migrate",
+		Short: "migrates keys in a v2 store to a mvcc store",
 		Run:   migrateCommandFunc,
 		Run:   migrateCommandFunc,
 	}
 	}
 
 

+ 1 - 1
etcdctl/ctlv3/command/role_command.go

@@ -33,8 +33,8 @@ func NewRoleCommand() *cobra.Command {
 	ac.AddCommand(newRoleDeleteCommand())
 	ac.AddCommand(newRoleDeleteCommand())
 	ac.AddCommand(newRoleGetCommand())
 	ac.AddCommand(newRoleGetCommand())
 	ac.AddCommand(newRoleListCommand())
 	ac.AddCommand(newRoleListCommand())
-	ac.AddCommand(newRoleRevokePermissionCommand())
 	ac.AddCommand(newRoleGrantPermissionCommand())
 	ac.AddCommand(newRoleGrantPermissionCommand())
+	ac.AddCommand(newRoleRevokePermissionCommand())
 
 
 	return ac
 	return ac
 }
 }

+ 2 - 2
etcdctl/ctlv3/command/user_command.go

@@ -89,7 +89,7 @@ func newUserChangePasswordCommand() *cobra.Command {
 		Run:   userChangePasswordCommandFunc,
 		Run:   userChangePasswordCommandFunc,
 	}
 	}
 
 
-	cmd.Flags().BoolVar(&passwordInteractive, "interactive", true, "read password from stdin instead of interactive terminal")
+	cmd.Flags().BoolVar(&passwordInteractive, "interactive", true, "if true, read password from stdin instead of interactive terminal")
 
 
 	return &cmd
 	return &cmd
 }
 }
@@ -105,7 +105,7 @@ func newUserGrantRoleCommand() *cobra.Command {
 func newUserRevokeRoleCommand() *cobra.Command {
 func newUserRevokeRoleCommand() *cobra.Command {
 	return &cobra.Command{
 	return &cobra.Command{
 		Use:   "revoke-role <user name> <role name>",
 		Use:   "revoke-role <user name> <role name>",
-		Short: "revoke a role from from a user",
+		Short: "revoke a role from a user",
 		Run:   userRevokeRoleCommandFunc,
 		Run:   userRevokeRoleCommandFunc,
 	}
 	}
 }
 }

+ 1 - 1
etcdctl/ctlv3/ctl.go

@@ -76,8 +76,8 @@ func init() {
 		command.NewMakeMirrorCommand(),
 		command.NewMakeMirrorCommand(),
 		command.NewMigrateCommand(),
 		command.NewMigrateCommand(),
 		command.NewLockCommand(),
 		command.NewLockCommand(),
-		command.NewAuthCommand(),
 		command.NewElectCommand(),
 		command.NewElectCommand(),
+		command.NewAuthCommand(),
 		command.NewUserCommand(),
 		command.NewUserCommand(),
 		command.NewRoleCommand(),
 		command.NewRoleCommand(),
 	)
 	)