github.com/palisadeinc/bor@v0.0.0-20230615125219-ab7196213d15/internal/cli/account.go (about) 1 package cli 2 3 import ( 4 "strings" 5 6 "github.com/mitchellh/cli" 7 ) 8 9 type Account struct { 10 UI cli.Ui 11 } 12 13 // MarkDown implements cli.MarkDown interface 14 func (a *Account) MarkDown() string { 15 items := []string{ 16 "# Account", 17 "The ```account``` command groups actions to interact with accounts:", 18 "- [```account new```](./account_new.md): Create a new account in the Bor client.", 19 "- [```account list```](./account_list.md): List the wallets in the Bor client.", 20 "- [```account import```](./account_import.md): Import an account to the Bor client.", 21 } 22 23 return strings.Join(items, "\n\n") 24 } 25 26 // Help implements the cli.Command interface 27 func (a *Account) Help() string { 28 return `Usage: bor account <subcommand> 29 30 This command groups actions to interact with accounts. 31 32 List the running deployments: 33 34 $ bor account new 35 36 Display the status of a specific deployment: 37 38 $ bor account import 39 40 List the imported accounts in the keystore: 41 42 $ bor account list` 43 } 44 45 // Synopsis implements the cli.Command interface 46 func (a *Account) Synopsis() string { 47 return "Interact with accounts" 48 } 49 50 // Run implements the cli.Command interface 51 func (a *Account) Run(args []string) int { 52 return cli.RunResultHelp 53 }