Correct arg length checks
This commit is contained in:
parent
fe750c751a
commit
a4076e00ff
3 changed files with 3 additions and 3 deletions
|
@ -42,7 +42,7 @@ var orgSecretAddCmd = cli.Command{
|
||||||
}
|
}
|
||||||
|
|
||||||
func orgSecretAdd(c *cli.Context) error {
|
func orgSecretAdd(c *cli.Context) error {
|
||||||
if len(c.Args().Tail()) != 3 {
|
if len(c.Args()) != 3 {
|
||||||
cli.ShowSubcommandHelp(c)
|
cli.ShowSubcommandHelp(c)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,7 @@ var orgSecretListCmd = cli.Command{
|
||||||
}
|
}
|
||||||
|
|
||||||
func orgSecretList(c *cli.Context) error {
|
func orgSecretList(c *cli.Context) error {
|
||||||
if len(c.Args().Tail()) != 1 {
|
if len(c.Args()) != 1 {
|
||||||
cli.ShowSubcommandHelp(c)
|
cli.ShowSubcommandHelp(c)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,7 @@ var orgSecretRemoveCmd = cli.Command{
|
||||||
}
|
}
|
||||||
|
|
||||||
func orgSecretRemove(c *cli.Context) error {
|
func orgSecretRemove(c *cli.Context) error {
|
||||||
if len(c.Args().Tail()) != 2 {
|
if len(c.Args()) != 2 {
|
||||||
cli.ShowSubcommandHelp(c)
|
cli.ShowSubcommandHelp(c)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue