working commit
This commit is contained in:
@@ -45,7 +45,7 @@ type CommonAccountParams struct {
|
||||
func (util *AccountUtil) CreateAccountCmds() *cobra.Command {
|
||||
var subCmd = &cobra.Command{
|
||||
Use: "accounts",
|
||||
Short: "Account operation",
|
||||
Short: "Account operations",
|
||||
Aliases: []string{"account"},
|
||||
}
|
||||
const defaultTimeout uint64 = 10
|
||||
@@ -58,7 +58,7 @@ func (util *AccountUtil) CreateAccountCmds() *cobra.Command {
|
||||
|
||||
// CreateAccount
|
||||
var createAccountCmd = &cobra.Command{
|
||||
Use: "create host username password",
|
||||
Use: "create [user:pass@]hostname[:port] username password",
|
||||
Short: "Create user account",
|
||||
Args: cobra.ExactArgs(3),
|
||||
Run: util.CreateAccount,
|
||||
@@ -67,7 +67,7 @@ func (util *AccountUtil) CreateAccountCmds() *cobra.Command {
|
||||
|
||||
// GetAccount
|
||||
var getAccountCmd = &cobra.Command{
|
||||
Use: "get hostname accountId|username",
|
||||
Use: "get [user:pass@]hostname[:port] accountId|username",
|
||||
Short: "Get account info",
|
||||
Args: cobra.ExactArgs(2),
|
||||
Run: util.GetAccount,
|
||||
@@ -76,7 +76,7 @@ func (util *AccountUtil) CreateAccountCmds() *cobra.Command {
|
||||
|
||||
// UpdateAccount
|
||||
var updateAccountCmd = &cobra.Command{
|
||||
Use: "update hostname username|accounId",
|
||||
Use: "update [user:pass@]hostname[:port] username|accounId",
|
||||
Short: "Update account parameters",
|
||||
Args: cobra.ExactArgs(2),
|
||||
Run: util.UpdateAccount,
|
||||
@@ -88,7 +88,7 @@ func (util *AccountUtil) CreateAccountCmds() *cobra.Command {
|
||||
|
||||
// DeleteAccount
|
||||
var deleteAccountCmd = &cobra.Command{
|
||||
Use: "delete hostname username|accountId",
|
||||
Use: "delete [user:pass@]hostname[:port] username|accountId",
|
||||
Short: "Delete account",
|
||||
Args: cobra.ExactArgs(2),
|
||||
Run: util.DeleteAccount,
|
||||
@@ -98,7 +98,7 @@ func (util *AccountUtil) CreateAccountCmds() *cobra.Command {
|
||||
|
||||
// ListAccount
|
||||
var listAccountsCmd = &cobra.Command{
|
||||
Use: "list hostname",
|
||||
Use: "list [user:pass@]hostname[:port]",
|
||||
Short: "list accounts",
|
||||
Args: cobra.ExactArgs(1),
|
||||
Run: util.ListAccounts,
|
||||
|
||||
Reference in New Issue
Block a user