Explicitly document required command line arguments

Cobra does not support automatic documentation of positional arguments
(see https://github.com/spf13/cobra/issues/378).
This commit is contained in:
Leo 2021-01-21 00:01:34 +01:00
parent f20ec49a0b
commit ea21b1782f
4 changed files with 5 additions and 5 deletions

View File

@ -35,7 +35,7 @@ var AdminCmd = &cobra.Command{
} }
var AdminClientInjectGuardianSetUpdateCmd = &cobra.Command{ var AdminClientInjectGuardianSetUpdateCmd = &cobra.Command{
Use: "governance-vaa-inject", Use: "governance-vaa-inject [FILENAME]",
Short: "Inject and sign a governance VAA from a prototxt file (see docs!)", Short: "Inject and sign a governance VAA from a prototxt file (see docs!)",
Run: runInjectGovernanceVAA, Run: runInjectGovernanceVAA,
Args: cobra.ExactArgs(1), Args: cobra.ExactArgs(1),

View File

@ -30,14 +30,14 @@ var TemplateCmd = &cobra.Command{
} }
var AdminClientGuardianSetTemplateCmd = &cobra.Command{ var AdminClientGuardianSetTemplateCmd = &cobra.Command{
Use: "guardian-set-update", Use: "guardian-set-update [FILENAME]",
Short: "Generate an empty guardian set template at specified path (offline)", Short: "Generate an empty guardian set template at specified path (offline)",
Run: runGuardianSetTemplate, Run: runGuardianSetTemplate,
Args: cobra.ExactArgs(1), Args: cobra.ExactArgs(1),
} }
var AdminClientContractUpgradeTemplateCmd = &cobra.Command{ var AdminClientContractUpgradeTemplateCmd = &cobra.Command{
Use: "contract-upgrade", Use: "contract-upgrade [FILENAME]",
Short: "Generate an empty contract upgrade template at specified path (offline)", Short: "Generate an empty contract upgrade template at specified path (offline)",
Run: runContractUpgradeTemplate, Run: runContractUpgradeTemplate,
Args: cobra.ExactArgs(1), Args: cobra.ExactArgs(1),

View File

@ -13,7 +13,7 @@ import (
) )
var AdminClientGovernanceVAAVerifyCmd = &cobra.Command{ var AdminClientGovernanceVAAVerifyCmd = &cobra.Command{
Use: "governance-vaa-verify", Use: "governance-vaa-verify [FILENAME]",
Short: "Verify governance vaa in prototxt format (offline)", Short: "Verify governance vaa in prototxt format (offline)",
Run: runGovernanceVAAVerify, Run: runGovernanceVAAVerify,
Args: cobra.ExactArgs(1), Args: cobra.ExactArgs(1),

View File

@ -29,7 +29,7 @@ func init() {
} }
var KeygenCmd = &cobra.Command{ var KeygenCmd = &cobra.Command{
Use: "keygen", Use: "keygen [KEYFILE]",
Short: "Create guardian key at the specified path", Short: "Create guardian key at the specified path",
Run: runKeygen, Run: runKeygen,
Args: cobra.ExactArgs(1), Args: cobra.ExactArgs(1),