0
0
forked from toolshed/abra

ugrade urfave/cli to v2

This commit is contained in:
2024-02-23 14:29:22 +01:00
parent d4727db8f9
commit 428426b6b7
48 changed files with 339 additions and 257 deletions

View File

@ -17,7 +17,7 @@ import (
"github.com/docker/docker/api/types"
dockerClient "github.com/docker/docker/client"
"github.com/sirupsen/logrus"
"github.com/urfave/cli"
"github.com/urfave/cli/v2"
)
var (
@ -76,7 +76,7 @@ var appSecretGenerateCommand = cli.Command{
}
}
if len(c.Args()) == 1 && !allSecrets {
if c.Args().Len() == 1 && !allSecrets {
err := errors.New("missing arguments <secret>/<version> or '--all'")
internal.ShowSubcommandHelpAndError(c, err)
}
@ -175,7 +175,7 @@ Example:
Action: func(c *cli.Context) error {
app := internal.ValidateApp(c)
if len(c.Args()) != 4 {
if c.Args().Len() != 4 {
internal.ShowSubcommandHelpAndError(c, errors.New("missing arguments?"))
}
@ -419,10 +419,10 @@ var appSecretCommand = cli.Command{
Aliases: []string{"s"},
Usage: "Manage app secrets",
ArgsUsage: "<domain>",
Subcommands: []cli.Command{
appSecretGenerateCommand,
appSecretInsertCommand,
appSecretRmCommand,
appSecretLsCommand,
Subcommands: []*cli.Command{
&appSecretGenerateCommand,
&appSecretInsertCommand,
&appSecretRmCommand,
&appSecretLsCommand,
},
}