forked from TrueCloudLab/neoneo-go
cli: add UsageText to commands that were missing it
Makes --help a bit more useful.
This commit is contained in:
parent
1367d0df00
commit
28e2010cbd
4 changed files with 85 additions and 66 deletions
|
@ -42,31 +42,35 @@ func NewCommands() []cli.Command {
|
|||
{
|
||||
Name: "candidates",
|
||||
Usage: "Get candidates and votes",
|
||||
UsageText: "neo-go query candidates -r endpoint [-s timeout]",
|
||||
Action: queryCandidates,
|
||||
Flags: options.RPC,
|
||||
},
|
||||
{
|
||||
Name: "committee",
|
||||
Usage: "Get committee list",
|
||||
UsageText: "neo-go query committee -r endpoint [-s timeout]",
|
||||
Action: queryCommittee,
|
||||
Flags: options.RPC,
|
||||
},
|
||||
{
|
||||
Name: "height",
|
||||
Usage: "Get node height",
|
||||
UsageText: "neo-go query height -r endpoint [-s timeout]",
|
||||
Action: queryHeight,
|
||||
Flags: options.RPC,
|
||||
},
|
||||
{
|
||||
Name: "tx",
|
||||
Usage: "Query transaction status",
|
||||
UsageText: "neo-go query tx <hash> -r endpoint [-v]",
|
||||
UsageText: "neo-go query tx <hash> -r endpoint [-s timeout] [-v]",
|
||||
Action: queryTx,
|
||||
Flags: queryTxFlags,
|
||||
},
|
||||
{
|
||||
Name: "voter",
|
||||
Usage: "Print NEO holder account state",
|
||||
UsageText: "neo-go query voter <address> -r endpoint [-s timeout]",
|
||||
Action: queryVoter,
|
||||
Flags: options.RPC,
|
||||
},
|
||||
|
|
|
@ -88,6 +88,7 @@ func NewCommands() []cli.Command {
|
|||
{
|
||||
Name: "node",
|
||||
Usage: "start a NEO node",
|
||||
UsageText: "neo-go node [--config-path path] [-d] [-p/-m/-t]",
|
||||
Action: startServer,
|
||||
Flags: cfgFlags,
|
||||
},
|
||||
|
@ -98,12 +99,14 @@ func NewCommands() []cli.Command {
|
|||
{
|
||||
Name: "dump",
|
||||
Usage: "dump blocks (starting with block #1) to the file",
|
||||
UsageText: "neo-go db dump -o file [-s start] [-c count] [--config-path path] [-p/-m/-t]",
|
||||
Action: dumpDB,
|
||||
Flags: cfgCountOutFlags,
|
||||
},
|
||||
{
|
||||
Name: "restore",
|
||||
Usage: "restore blocks from the file",
|
||||
UsageText: "neo-go db restore -i file [--dump] [-n] [-c count] [--config-path path] [-p/-m/-t]",
|
||||
Action: restoreDB,
|
||||
Flags: cfgCountInFlags,
|
||||
},
|
||||
|
|
|
@ -138,6 +138,7 @@ func NewCommands() []cli.Command {
|
|||
{
|
||||
Name: "compile",
|
||||
Usage: "compile a smart contract to a .nef file",
|
||||
UsageText: "neo-go contract compile -i path [-o nef] [-v] [-d] [-m manifest] [-c yaml] [--bindings file] [--no-standards] [--no-events] [--no-permissions]",
|
||||
Action: contractCompile,
|
||||
Flags: []cli.Flag{
|
||||
cli.StringFlag{
|
||||
|
@ -342,6 +343,7 @@ func NewCommands() []cli.Command {
|
|||
{
|
||||
Name: "init",
|
||||
Usage: "initialize a new smart-contract in a directory with boiler plate code",
|
||||
UsageText: "neo-go contract init -n name [--skip-details]",
|
||||
Action: initSmartContract,
|
||||
Flags: []cli.Flag{
|
||||
cli.StringFlag{
|
||||
|
@ -357,6 +359,7 @@ func NewCommands() []cli.Command {
|
|||
{
|
||||
Name: "inspect",
|
||||
Usage: "creates a user readable dump of the program instructions",
|
||||
UsageText: "neo-go contract inspect -i file [-c]",
|
||||
Action: inspect,
|
||||
Flags: []cli.Flag{
|
||||
cli.BoolFlag{
|
||||
|
@ -372,6 +375,7 @@ func NewCommands() []cli.Command {
|
|||
{
|
||||
Name: "calc-hash",
|
||||
Usage: "calculates hash of a contract after deployment",
|
||||
UsageText: "neo-go contract calc-hash -i nef -m manifest -s address",
|
||||
Action: calcHash,
|
||||
Flags: []cli.Flag{
|
||||
flags.AddressFlag{
|
||||
|
@ -395,6 +399,7 @@ func NewCommands() []cli.Command {
|
|||
{
|
||||
Name: "add-group",
|
||||
Usage: "adds group to the manifest",
|
||||
UsageText: "neo-go contract manifest add-group -w wallet [--wallet-config path] -n nef -m manifest -a address -s address",
|
||||
Action: manifestAddGroup,
|
||||
Flags: []cli.Flag{
|
||||
walletFlag,
|
||||
|
|
|
@ -112,12 +112,14 @@ func NewCommands() []cli.Command {
|
|||
{
|
||||
Name: "claim",
|
||||
Usage: "claim GAS",
|
||||
UsageText: "neo-go wallet claim -w wallet [--wallet-config path] -a address -r endpoint [-s timeout]",
|
||||
Action: claimGas,
|
||||
Flags: claimFlags,
|
||||
},
|
||||
{
|
||||
Name: "init",
|
||||
Usage: "create a new wallet",
|
||||
UsageText: "neo-go wallet init -w wallet [--wallet-config path] [-a]",
|
||||
Action: createWallet,
|
||||
Flags: []cli.Flag{
|
||||
walletPathFlag,
|
||||
|
@ -131,6 +133,7 @@ func NewCommands() []cli.Command {
|
|||
{
|
||||
Name: "change-password",
|
||||
Usage: "change password for accounts",
|
||||
UsageText: "neo-go wallet change-password -w wallet -a address",
|
||||
Action: changePassword,
|
||||
Flags: []cli.Flag{
|
||||
walletPathFlag,
|
||||
|
@ -143,6 +146,7 @@ func NewCommands() []cli.Command {
|
|||
{
|
||||
Name: "convert",
|
||||
Usage: "convert addresses from existing NEO2 NEP6-wallet to NEO3 format",
|
||||
UsageText: "neo-go wallet convert -w legacywallet [--wallet-config path] -o n3wallet",
|
||||
Action: convertWallet,
|
||||
Flags: []cli.Flag{
|
||||
walletPathFlag,
|
||||
|
@ -156,6 +160,7 @@ func NewCommands() []cli.Command {
|
|||
{
|
||||
Name: "create",
|
||||
Usage: "add an account to the existing wallet",
|
||||
UsageText: "neo-go wallet create -w wallet [--wallet-config path]",
|
||||
Action: addAccount,
|
||||
Flags: []cli.Flag{
|
||||
walletPathFlag,
|
||||
|
@ -165,6 +170,7 @@ func NewCommands() []cli.Command {
|
|||
{
|
||||
Name: "dump",
|
||||
Usage: "check and dump an existing NEO wallet",
|
||||
UsageText: "neo-go wallet dump -w wallet [--wallet-config path] [-d]",
|
||||
Action: dumpWallet,
|
||||
Flags: []cli.Flag{
|
||||
walletPathFlag,
|
||||
|
@ -175,6 +181,7 @@ func NewCommands() []cli.Command {
|
|||
{
|
||||
Name: "dump-keys",
|
||||
Usage: "dump public keys for account",
|
||||
UsageText: "neo-go wallet dump-keys -w wallet [--wallet-config path] [-a address]",
|
||||
Action: dumpKeys,
|
||||
Flags: []cli.Flag{
|
||||
walletPathFlag,
|
||||
|
|
Loading…
Reference in a new issue