diff --git a/cli/app/app.go b/cli/app/app.go index 00343cbe..72ff7da1 100644 --- a/cli/app/app.go +++ b/cli/app/app.go @@ -1,7 +1,7 @@ package app import ( - "github.com/urfave/cli" + "github.com/urfave/cli/v2" ) var AppCommand = cli.Command{ @@ -9,26 +9,26 @@ var AppCommand = cli.Command{ Aliases: []string{"a"}, Usage: "Manage apps", ArgsUsage: "", - Subcommands: []cli.Command{ - appBackupCommand, - appCheckCommand, - appCmdCommand, - appConfigCommand, - appCpCommand, - appDeployCommand, - appListCommand, - appLogsCommand, - appNewCommand, - appPsCommand, - appRemoveCommand, - appRestartCommand, - appRestoreCommand, - appRollbackCommand, - appRunCommand, - appSecretCommand, - appServicesCommand, - appUndeployCommand, - appUpgradeCommand, - appVolumeCommand, + Subcommands: []*cli.Command{ + &appBackupCommand, + &appCheckCommand, + &appCmdCommand, + &appConfigCommand, + &appCpCommand, + &appDeployCommand, + &appListCommand, + &appLogsCommand, + &appNewCommand, + &appPsCommand, + &appRemoveCommand, + &appRestartCommand, + &appRestoreCommand, + &appRollbackCommand, + &appRunCommand, + &appSecretCommand, + &appServicesCommand, + &appUndeployCommand, + &appUpgradeCommand, + &appVolumeCommand, }, } diff --git a/cli/app/backup.go b/cli/app/backup.go index 5c3e1029..879e21bc 100644 --- a/cli/app/backup.go +++ b/cli/app/backup.go @@ -7,26 +7,29 @@ import ( "coopcloud.tech/abra/pkg/autocomplete" "coopcloud.tech/abra/pkg/client" "coopcloud.tech/abra/pkg/log" - "github.com/urfave/cli" + "github.com/urfave/cli/v2" ) var snapshot string var snapshotFlag = &cli.StringFlag{ - Name: "snapshot, s", + Name: "snapshot", + Aliases: []string{"s"}, Usage: "Lists specific snapshot", Destination: &snapshot, } var includePath string var includePathFlag = &cli.StringFlag{ - Name: "path, p", + Name: "path", + Aliases: []string{"p"}, Usage: "Include path", Destination: &includePath, } var resticRepo string var resticRepoFlag = &cli.StringFlag{ - Name: "repo, r", + Name: "repo", + Aliases: []string{"r"}, Usage: "Restic repository", Destination: &resticRepo, } @@ -270,10 +273,10 @@ var appBackupCommand = cli.Command{ Aliases: []string{"b"}, Usage: "Manage app backups", ArgsUsage: "", - Subcommands: []cli.Command{ - appBackupListCommand, - appBackupSnapshotsCommand, - appBackupDownloadCommand, - appBackupCreateCommand, + Subcommands: []*cli.Command{ + &appBackupListCommand, + &appBackupSnapshotsCommand, + &appBackupDownloadCommand, + &appBackupCreateCommand, }, } diff --git a/cli/app/check.go b/cli/app/check.go index b5eca951..008f151a 100644 --- a/cli/app/check.go +++ b/cli/app/check.go @@ -6,7 +6,7 @@ import ( "coopcloud.tech/abra/pkg/autocomplete" "coopcloud.tech/abra/pkg/formatter" "coopcloud.tech/abra/pkg/log" - "github.com/urfave/cli" + "github.com/urfave/cli/v2" ) var appCheckCommand = cli.Command{ diff --git a/cli/app/cmd.go b/cli/app/cmd.go index 58ec5dc3..26baea0e 100644 --- a/cli/app/cmd.go +++ b/cli/app/cmd.go @@ -14,7 +14,7 @@ import ( "coopcloud.tech/abra/pkg/autocomplete" "coopcloud.tech/abra/pkg/client" "coopcloud.tech/abra/pkg/log" - "github.com/urfave/cli" + "github.com/urfave/cli/v2" ) var appCmdCommand = cli.Command{ @@ -42,11 +42,13 @@ EXAMPLE: internal.OfflineFlag, internal.ChaosFlag, }, - Before: internal.SubCommandBefore, - Subcommands: []cli.Command{appCmdListCommand}, + Before: internal.SubCommandBefore, + Subcommands: []*cli.Command{ + &appCmdListCommand, + }, BashComplete: func(ctx *cli.Context) { args := ctx.Args() - switch len(args) { + switch args.Len() { case 0: autocomplete.AppNameComplete(ctx) case 1: @@ -66,7 +68,7 @@ EXAMPLE: internal.ShowSubcommandHelpAndError(c, errors.New("cannot use --local & --user together")) } - hasCmdArgs, parsedCmdArgs := parseCmdArgs(c.Args(), internal.LocalCmd) + hasCmdArgs, parsedCmdArgs := parseCmdArgs(c.Args().Slice(), internal.LocalCmd) if _, err := os.Stat(app.Recipe.AbraShPath); err != nil { if os.IsNotExist(err) { @@ -76,7 +78,7 @@ EXAMPLE: } if internal.LocalCmd { - if !(len(c.Args()) >= 2) { + if !(c.Args().Len() >= 2) { internal.ShowSubcommandHelpAndError(c, errors.New("missing arguments")) } @@ -112,7 +114,7 @@ EXAMPLE: log.Fatal(err) } } else { - if !(len(c.Args()) >= 3) { + if !(c.Args().Len() >= 3) { internal.ShowSubcommandHelpAndError(c, errors.New("missing arguments")) } diff --git a/cli/app/config.go b/cli/app/config.go index a21c25f7..5b583deb 100644 --- a/cli/app/config.go +++ b/cli/app/config.go @@ -10,7 +10,7 @@ import ( "coopcloud.tech/abra/pkg/autocomplete" "coopcloud.tech/abra/pkg/log" "github.com/AlecAivazis/survey/v2" - "github.com/urfave/cli" + "github.com/urfave/cli/v2" ) var appConfigCommand = cli.Command{ diff --git a/cli/app/cp.go b/cli/app/cp.go index e5d2035c..26124b3d 100644 --- a/cli/app/cp.go +++ b/cli/app/cp.go @@ -22,7 +22,7 @@ import ( dockerClient "github.com/docker/docker/client" "github.com/docker/docker/errdefs" "github.com/docker/docker/pkg/archive" - "github.com/urfave/cli" + "github.com/urfave/cli/v2" ) var appCpCommand = cli.Command{ diff --git a/cli/app/deploy.go b/cli/app/deploy.go index d589c694..75680f84 100644 --- a/cli/app/deploy.go +++ b/cli/app/deploy.go @@ -15,7 +15,7 @@ import ( "coopcloud.tech/abra/pkg/lint" "coopcloud.tech/abra/pkg/log" "coopcloud.tech/abra/pkg/upstream/stack" - "github.com/urfave/cli" + "github.com/urfave/cli/v2" ) var appDeployCommand = cli.Command{ diff --git a/cli/app/list.go b/cli/app/list.go index 20fa2acc..877da76b 100644 --- a/cli/app/list.go +++ b/cli/app/list.go @@ -12,13 +12,14 @@ import ( "coopcloud.tech/abra/pkg/formatter" "coopcloud.tech/abra/pkg/log" "coopcloud.tech/tagcmp" - "github.com/urfave/cli" + "github.com/urfave/cli/v2" ) var ( status bool statusFlag = &cli.BoolFlag{ - Name: "status, S", + Name: "status", + Aliases: []string{"S"}, Usage: "Show app deployment status", Destination: &status, } @@ -27,7 +28,8 @@ var ( var ( recipeFilter string recipeFlag = &cli.StringFlag{ - Name: "recipe, r", + Name: "recipe", + Aliases: []string{"r"}, Value: "", Usage: "Show apps of a specific recipe", Destination: &recipeFilter, @@ -37,7 +39,8 @@ var ( var ( listAppServer string listAppServerFlag = &cli.StringFlag{ - Name: "server, s", + Name: "server", + Aliases: []string{"s"}, Value: "", Usage: "Show apps of a specific server", Destination: &listAppServer, diff --git a/cli/app/logs.go b/cli/app/logs.go index 319c642c..ff8bc2ac 100644 --- a/cli/app/logs.go +++ b/cli/app/logs.go @@ -19,7 +19,7 @@ import ( "github.com/docker/docker/api/types/filters" "github.com/docker/docker/api/types/swarm" dockerClient "github.com/docker/docker/client" - "github.com/urfave/cli" + "github.com/urfave/cli/v2" ) var appLogsCommand = cli.Command{ diff --git a/cli/app/new.go b/cli/app/new.go index 27bda8f4..450eaf67 100644 --- a/cli/app/new.go +++ b/cli/app/new.go @@ -15,7 +15,7 @@ import ( "coopcloud.tech/abra/pkg/secret" "github.com/AlecAivazis/survey/v2" dockerClient "github.com/docker/docker/client" - "github.com/urfave/cli" + "github.com/urfave/cli/v2" ) var appNewDescription = ` @@ -56,7 +56,7 @@ var appNewCommand = cli.Command{ ArgsUsage: "[] []", BashComplete: func(ctx *cli.Context) { args := ctx.Args() - switch len(args) { + switch args.Len() { case 0: autocomplete.RecipeNameComplete(ctx) case 1: diff --git a/cli/app/ps.go b/cli/app/ps.go index 008d59ce..defd850a 100644 --- a/cli/app/ps.go +++ b/cli/app/ps.go @@ -17,7 +17,7 @@ import ( containerTypes "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/filters" dockerClient "github.com/docker/docker/client" - "github.com/urfave/cli" + "github.com/urfave/cli/v2" ) var appPsCommand = cli.Command{ diff --git a/cli/app/remove.go b/cli/app/remove.go index b6476f20..f8dc7a5e 100644 --- a/cli/app/remove.go +++ b/cli/app/remove.go @@ -12,7 +12,7 @@ import ( stack "coopcloud.tech/abra/pkg/upstream/stack" "github.com/AlecAivazis/survey/v2" "github.com/docker/docker/api/types" - "github.com/urfave/cli" + "github.com/urfave/cli/v2" ) var appRemoveCommand = cli.Command{ diff --git a/cli/app/restart.go b/cli/app/restart.go index bba2983f..3de623c9 100644 --- a/cli/app/restart.go +++ b/cli/app/restart.go @@ -12,7 +12,7 @@ import ( "coopcloud.tech/abra/pkg/log" upstream "coopcloud.tech/abra/pkg/upstream/service" stack "coopcloud.tech/abra/pkg/upstream/stack" - "github.com/urfave/cli" + "github.com/urfave/cli/v2" ) var appRestartCommand = cli.Command{ diff --git a/cli/app/restore.go b/cli/app/restore.go index 8ce54fb8..c73a347b 100644 --- a/cli/app/restore.go +++ b/cli/app/restore.go @@ -7,12 +7,13 @@ import ( "coopcloud.tech/abra/pkg/autocomplete" "coopcloud.tech/abra/pkg/client" "coopcloud.tech/abra/pkg/log" - "github.com/urfave/cli" + "github.com/urfave/cli/v2" ) var targetPath string var targetPathFlag = &cli.StringFlag{ - Name: "target, t", + Name: "target", + Aliases: []string{"t"}, Usage: "Target path", Destination: &targetPath, } diff --git a/cli/app/rollback.go b/cli/app/rollback.go index 79a35359..f3936e8d 100644 --- a/cli/app/rollback.go +++ b/cli/app/rollback.go @@ -15,7 +15,7 @@ import ( "coopcloud.tech/abra/pkg/client" "coopcloud.tech/abra/pkg/log" "github.com/AlecAivazis/survey/v2" - "github.com/urfave/cli" + "github.com/urfave/cli/v2" ) var appRollbackCommand = cli.Command{ diff --git a/cli/app/run.go b/cli/app/run.go index 6866659d..b7192157 100644 --- a/cli/app/run.go +++ b/cli/app/run.go @@ -14,19 +14,21 @@ import ( "github.com/docker/cli/cli/command" "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/filters" - "github.com/urfave/cli" + "github.com/urfave/cli/v2" ) var user string var userFlag = &cli.StringFlag{ - Name: "user, u", + Name: "user", + Aliases: []string{"u"}, Value: "", Destination: &user, } var noTTY bool var noTTYFlag = &cli.BoolFlag{ - Name: "no-tty, t", + Name: "no-tty", + Aliases: []string{"t"}, Destination: &noTTY, } @@ -45,11 +47,11 @@ var appRunCommand = cli.Command{ Action: func(c *cli.Context) error { app := internal.ValidateApp(c) - if len(c.Args()) < 2 { + if c.Args().Len() < 2 { internal.ShowSubcommandHelpAndError(c, errors.New("no provided?")) } - if len(c.Args()) < 3 { + if c.Args().Len() < 3 { internal.ShowSubcommandHelpAndError(c, errors.New("no provided?")) } @@ -68,7 +70,7 @@ var appRunCommand = cli.Command{ log.Fatal(err) } - cmd := c.Args()[2:] + cmd := c.Args().Slice()[2:] execCreateOpts := types.ExecConfig{ AttachStderr: true, AttachStdin: true, diff --git a/cli/app/secret.go b/cli/app/secret.go index a8fe9486..78a9e28f 100644 --- a/cli/app/secret.go +++ b/cli/app/secret.go @@ -17,13 +17,14 @@ import ( "coopcloud.tech/abra/pkg/secret" "github.com/docker/docker/api/types" dockerClient "github.com/docker/docker/client" - "github.com/urfave/cli" + "github.com/urfave/cli/v2" ) var ( allSecrets bool allSecretsFlag = &cli.BoolFlag{ - Name: "all, a", + Name: "all", + Aliases: []string{"a"}, Destination: &allSecrets, Usage: "Generate all secrets", } @@ -32,7 +33,8 @@ var ( var ( rmAllSecrets bool rmAllSecretsFlag = &cli.BoolFlag{ - Name: "all, a", + Name: "all", + Aliases: []string{"a"}, Destination: &rmAllSecrets, Usage: "Remove all secrets", } @@ -59,7 +61,7 @@ var appSecretGenerateCommand = cli.Command{ log.Fatal(err) } - if len(c.Args()) == 1 && !allSecrets { + if c.Args().Len() == 1 && !allSecrets { err := errors.New("missing arguments / or '--all'") internal.ShowSubcommandHelpAndError(c, err) } @@ -160,7 +162,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?")) } @@ -382,10 +384,10 @@ var appSecretCommand = cli.Command{ Aliases: []string{"s"}, Usage: "Manage app secrets", ArgsUsage: "", - Subcommands: []cli.Command{ - appSecretGenerateCommand, - appSecretInsertCommand, - appSecretRmCommand, - appSecretLsCommand, + Subcommands: []*cli.Command{ + &appSecretGenerateCommand, + &appSecretInsertCommand, + &appSecretRmCommand, + &appSecretLsCommand, }, } diff --git a/cli/app/services.go b/cli/app/services.go index 97dfda61..892375c1 100644 --- a/cli/app/services.go +++ b/cli/app/services.go @@ -13,7 +13,7 @@ import ( "coopcloud.tech/abra/pkg/service" stack "coopcloud.tech/abra/pkg/upstream/stack" containerTypes "github.com/docker/docker/api/types/container" - "github.com/urfave/cli" + "github.com/urfave/cli/v2" ) var appServicesCommand = cli.Command{ diff --git a/cli/app/undeploy.go b/cli/app/undeploy.go index 5e63d62c..06105a10 100644 --- a/cli/app/undeploy.go +++ b/cli/app/undeploy.go @@ -13,13 +13,14 @@ import ( stack "coopcloud.tech/abra/pkg/upstream/stack" "github.com/docker/docker/api/types/filters" dockerClient "github.com/docker/docker/client" - "github.com/urfave/cli" + "github.com/urfave/cli/v2" ) var prune bool var pruneFlag = &cli.BoolFlag{ - Name: "prune, p", + Name: "prune", + Aliases: []string{"p"}, Destination: &prune, Usage: "Prunes unused containers, networks, and dangling images for an app", } diff --git a/cli/app/upgrade.go b/cli/app/upgrade.go index 26366aef..ee0354f9 100644 --- a/cli/app/upgrade.go +++ b/cli/app/upgrade.go @@ -14,7 +14,7 @@ import ( stack "coopcloud.tech/abra/pkg/upstream/stack" "coopcloud.tech/tagcmp" "github.com/AlecAivazis/survey/v2" - "github.com/urfave/cli" + "github.com/urfave/cli/v2" ) var appUpgradeCommand = cli.Command{ diff --git a/cli/app/volume.go b/cli/app/volume.go index 31569394..1abefff5 100644 --- a/cli/app/volume.go +++ b/cli/app/volume.go @@ -10,7 +10,7 @@ import ( "coopcloud.tech/abra/pkg/log" "coopcloud.tech/abra/pkg/upstream/stack" "github.com/AlecAivazis/survey/v2" - "github.com/urfave/cli" + "github.com/urfave/cli/v2" ) var appVolumeListCommand = cli.Command{ @@ -149,8 +149,8 @@ var appVolumeCommand = cli.Command{ Aliases: []string{"vl"}, Usage: "Manage app volumes", ArgsUsage: "", - Subcommands: []cli.Command{ - appVolumeListCommand, - appVolumeRemoveCommand, + Subcommands: []*cli.Command{ + &appVolumeListCommand, + &appVolumeRemoveCommand, }, } diff --git a/cli/catalogue/catalogue.go b/cli/catalogue/catalogue.go index 27069680..d3ef81ce 100644 --- a/cli/catalogue/catalogue.go +++ b/cli/catalogue/catalogue.go @@ -15,7 +15,7 @@ import ( "coopcloud.tech/abra/pkg/log" "coopcloud.tech/abra/pkg/recipe" "github.com/go-git/go-git/v5" - "github.com/urfave/cli" + "github.com/urfave/cli/v2" ) var catalogueGenerateCommand = cli.Command{ @@ -209,7 +209,7 @@ var CatalogueCommand = cli.Command{ Usage: "Manage the recipe catalogue", Aliases: []string{"c"}, ArgsUsage: "", - Subcommands: []cli.Command{ - catalogueGenerateCommand, + Subcommands: []*cli.Command{ + &catalogueGenerateCommand, }, } diff --git a/cli/cli.go b/cli/cli.go index 6b971ade..ecffaeb6 100644 --- a/cli/cli.go +++ b/cli/cli.go @@ -18,7 +18,7 @@ import ( "coopcloud.tech/abra/pkg/log" "coopcloud.tech/abra/pkg/web" charmLog "github.com/charmbracelet/log" - "github.com/urfave/cli" + "github.com/urfave/cli/v2" ) // AutoCompleteCommand helps people set up auto-complete in their shells @@ -156,13 +156,13 @@ func newAbraApp(version, commit string) *cli.App { |_| `, Version: fmt.Sprintf("%s-%s", version, commit[:7]), - Commands: []cli.Command{ - app.AppCommand, - server.ServerCommand, - recipe.RecipeCommand, - catalogue.CatalogueCommand, - UpgradeCommand, - AutoCompleteCommand, + Commands: []*cli.Command{ + &app.AppCommand, + &server.ServerCommand, + &recipe.RecipeCommand, + &catalogue.CatalogueCommand, + &UpgradeCommand, + &AutoCompleteCommand, }, BashComplete: autocomplete.SubcommandComplete, } diff --git a/cli/internal/cli.go b/cli/internal/cli.go index df77ffcc..ae4c52a7 100644 --- a/cli/internal/cli.go +++ b/cli/internal/cli.go @@ -4,7 +4,7 @@ import ( "os" "coopcloud.tech/abra/pkg/log" - "github.com/urfave/cli" + "github.com/urfave/cli/v2" ) // Secrets stores the variable from SecretsFlag @@ -12,7 +12,8 @@ var Secrets bool // SecretsFlag turns on/off automatically generating secrets var SecretsFlag = &cli.BoolFlag{ - Name: "secrets, S", + Name: "secrets", + Aliases: []string{"S"}, Usage: "Automatically generate secrets", Destination: &Secrets, } @@ -22,7 +23,8 @@ var Pass bool // PassFlag turns on/off storing generated secrets in pass var PassFlag = &cli.BoolFlag{ - Name: "pass, p", + Name: "pass", + Aliases: []string{"p"}, Usage: "Store the generated secrets in a local pass store", Destination: &Pass, } @@ -32,21 +34,24 @@ var PassRemove bool // PassRemoveFlag turns on/off removing generated secrets from pass var PassRemoveFlag = &cli.BoolFlag{ - Name: "pass, p", + Name: "pass", + Aliases: []string{"p"}, Usage: "Remove generated secrets from a local pass store", Destination: &PassRemove, } var File bool var FileFlag = &cli.BoolFlag{ - Name: "file, f", + Name: "file", + Aliases: []string{"f"}, Usage: "Treat input as a file", Destination: &File, } var Trim bool var TrimFlag = &cli.BoolFlag{ - Name: "trim, t", + Name: "trim", + Aliases: []string{"t"}, Usage: "Trim input", Destination: &Trim, } @@ -56,7 +61,8 @@ var Force bool // ForceFlag turns on/off force functionality. var ForceFlag = &cli.BoolFlag{ - Name: "force, f", + Name: "force", + Aliases: []string{"f"}, Usage: "Perform action without further prompt. Use with care!", Destination: &Force, } @@ -66,7 +72,8 @@ var Chaos bool // ChaosFlag turns on/off chaos functionality. var ChaosFlag = &cli.BoolFlag{ - Name: "chaos, C", + Name: "chaos", + Aliases: []string{"C"}, Usage: "Proceed with uncommitted recipes changes. Use with care!", Destination: &Chaos, } @@ -76,14 +83,16 @@ var Tty bool // TtyFlag turns on/off tty mode. var TtyFlag = &cli.BoolFlag{ - Name: "tty, T", + Name: "tty", + Aliases: []string{"T"}, Usage: "Disables TTY mode to run this command from a script.", Destination: &Tty, } var NoInput bool var NoInputFlag = &cli.BoolFlag{ - Name: "no-input, n", + Name: "no-input", + Aliases: []string{"n"}, Usage: "Toggle non-interactive mode", Destination: &NoInput, } @@ -93,7 +102,8 @@ var Debug bool // DebugFlag turns on/off verbose logging down to the DEBUG level. var DebugFlag = &cli.BoolFlag{ - Name: "debug, d", + Name: "debug", + Aliases: []string{"d"}, Destination: &Debug, Usage: "Show DEBUG messages", } @@ -103,7 +113,8 @@ var Offline bool // DebugFlag turns on/off offline mode. var OfflineFlag = &cli.BoolFlag{ - Name: "offline, o", + Name: "offline", + Aliases: []string{"o"}, Destination: &Offline, Usage: "Prefer offline & filesystem access when possible", } @@ -113,7 +124,8 @@ var ReleaseNotes bool // ReleaseNotesFlag turns on/off printing only release notes when upgrading. var ReleaseNotesFlag = &cli.BoolFlag{ - Name: "releasenotes, r", + Name: "releasenotes", + Aliases: []string{"r"}, Destination: &ReleaseNotes, Usage: "Only show release notes", } @@ -123,7 +135,8 @@ var MachineReadable bool // MachineReadableFlag turns on/off machine readable output where supported var MachineReadableFlag = &cli.BoolFlag{ - Name: "machine, m", + Name: "machine", + Aliases: []string{"m"}, Destination: &MachineReadable, Usage: "Output in a machine-readable format (where supported)", } @@ -133,49 +146,56 @@ var RC bool // RCFlag chooses the latest release candidate for install var RCFlag = &cli.BoolFlag{ - Name: "rc, r", + Name: "rc", + Aliases: []string{"r"}, Destination: &RC, Usage: "Install the latest release candidate", } var Major bool var MajorFlag = &cli.BoolFlag{ - Name: "major, x", + Name: "major", + Aliases: []string{"x"}, Usage: "Increase the major part of the version", Destination: &Major, } var Minor bool var MinorFlag = &cli.BoolFlag{ - Name: "minor, y", + Name: "minor", + Aliases: []string{"y"}, Usage: "Increase the minor part of the version", Destination: &Minor, } var Patch bool var PatchFlag = &cli.BoolFlag{ - Name: "patch, z", + Name: "patch", + Aliases: []string{"z"}, Usage: "Increase the patch part of the version", Destination: &Patch, } var Dry bool var DryFlag = &cli.BoolFlag{ - Name: "dry-run, r", + Name: "dry-run", + Aliases: []string{"r"}, Usage: "Only reports changes that would be made", Destination: &Dry, } var Publish bool var PublishFlag = &cli.BoolFlag{ - Name: "publish, p", + Name: "publish", + Aliases: []string{"p"}, Usage: "Publish changes to git.coopcloud.tech", Destination: &Publish, } var Domain string var DomainFlag = &cli.StringFlag{ - Name: "domain, D", + Name: "domain", + Aliases: []string{"D"}, Value: "", Usage: "Choose a domain name", Destination: &Domain, @@ -183,7 +203,8 @@ var DomainFlag = &cli.StringFlag{ var NewAppServer string var NewAppServerFlag = &cli.StringFlag{ - Name: "server, s", + Name: "server", + Aliases: []string{"s"}, Value: "", Usage: "Show apps of a specific server", Destination: &NewAppServer, @@ -191,21 +212,24 @@ var NewAppServerFlag = &cli.StringFlag{ var NoDomainChecks bool var NoDomainChecksFlag = &cli.BoolFlag{ - Name: "no-domain-checks, D", + Name: "no-domain-checks", + Aliases: []string{"D"}, Usage: "Disable public DNS checks", Destination: &NoDomainChecks, } var StdErrOnly bool var StdErrOnlyFlag = &cli.BoolFlag{ - Name: "stderr, s", + Name: "stderr", + Aliases: []string{"s"}, Usage: "Only tail stderr", Destination: &StdErrOnly, } var SinceLogs string var SinceLogsFlag = &cli.StringFlag{ - Name: "since, S", + Name: "since", + Aliases: []string{"S"}, Value: "", Usage: "tail logs since YYYY-MM-DDTHH:MM:SSZ", Destination: &SinceLogs, @@ -213,49 +237,56 @@ var SinceLogsFlag = &cli.StringFlag{ var DontWaitConverge bool var DontWaitConvergeFlag = &cli.BoolFlag{ - Name: "no-converge-checks, c", + Name: "no-converge-checks", + Aliases: []string{"c"}, Usage: "Don't wait for converge logic checks", Destination: &DontWaitConverge, } var Watch bool var WatchFlag = &cli.BoolFlag{ - Name: "watch, w", + Name: "watch", + Aliases: []string{"w"}, Usage: "Watch status by polling repeatedly", Destination: &Watch, } var OnlyErrors bool var OnlyErrorFlag = &cli.BoolFlag{ - Name: "errors, e", + Name: "errors", + Aliases: []string{"e"}, Usage: "Only show errors", Destination: &OnlyErrors, } var SkipUpdates bool var SkipUpdatesFlag = &cli.BoolFlag{ - Name: "skip-updates, s", + Name: "skip-updates", + Aliases: []string{"s"}, Usage: "Skip updating recipe repositories", Destination: &SkipUpdates, } var AllTags bool var AllTagsFlag = &cli.BoolFlag{ - Name: "all-tags, a", + Name: "all-tags", + Aliases: []string{"a"}, Usage: "List all tags, not just upgrades", Destination: &AllTags, } var LocalCmd bool var LocalCmdFlag = &cli.BoolFlag{ - Name: "local, l", + Name: "local", + Aliases: []string{"l"}, Usage: "Run command locally", Destination: &LocalCmd, } var RemoteUser string var RemoteUserFlag = &cli.StringFlag{ - Name: "user, u", + Name: "user", + Aliases: []string{"u"}, Value: "", Usage: "User to run command within a service context", Destination: &RemoteUser, @@ -263,7 +294,8 @@ var RemoteUserFlag = &cli.StringFlag{ var GitName string var GitNameFlag = &cli.StringFlag{ - Name: "git-name, gn", + Name: "git-name", + Aliases: []string{"gn"}, Value: "", Usage: "Git (user) name to do commits with", Destination: &GitName, @@ -271,7 +303,8 @@ var GitNameFlag = &cli.StringFlag{ var GitEmail string var GitEmailFlag = &cli.StringFlag{ - Name: "git-email, ge", + Name: "git-email", + Aliases: []string{"ge"}, Value: "", Usage: "Git email name to do commits with", Destination: &GitEmail, @@ -279,7 +312,8 @@ var GitEmailFlag = &cli.StringFlag{ var AllServices bool var AllServicesFlag = &cli.BoolFlag{ - Name: "all-services, a", + Name: "all-services", + Aliases: []string{"a"}, Usage: "Restart all services", Destination: &AllServices, } diff --git a/cli/internal/errors.go b/cli/internal/errors.go index b998d092..199accd7 100644 --- a/cli/internal/errors.go +++ b/cli/internal/errors.go @@ -4,7 +4,7 @@ import ( "os" "coopcloud.tech/abra/pkg/log" - "github.com/urfave/cli" + "github.com/urfave/cli/v2" ) // ShowSubcommandHelpAndError exits the program on error, logs the error to the diff --git a/cli/internal/validate.go b/cli/internal/validate.go index 9f416e91..42bb6635 100644 --- a/cli/internal/validate.go +++ b/cli/internal/validate.go @@ -9,7 +9,7 @@ import ( "coopcloud.tech/abra/pkg/log" "coopcloud.tech/abra/pkg/recipe" "github.com/AlecAivazis/survey/v2" - "github.com/urfave/cli" + "github.com/urfave/cli/v2" ) // ValidateRecipe ensures the recipe arg is valid. @@ -125,9 +125,9 @@ func ValidateDomain(c *cli.Context) string { // ValidateSubCmdFlags ensures flag order conforms to correct order func ValidateSubCmdFlags(c *cli.Context) bool { - for argIdx, arg := range c.Args() { + for argIdx, arg := range c.Args().Slice() { if !strings.HasPrefix(arg, "--") { - for _, flag := range c.Args()[argIdx:] { + for _, flag := range c.Args().Slice()[argIdx:] { if strings.HasPrefix(flag, "--") { return false } diff --git a/cli/recipe/diff.go b/cli/recipe/diff.go index e53b3e8f..3eb42482 100644 --- a/cli/recipe/diff.go +++ b/cli/recipe/diff.go @@ -5,7 +5,7 @@ import ( "coopcloud.tech/abra/pkg/autocomplete" gitPkg "coopcloud.tech/abra/pkg/git" "coopcloud.tech/abra/pkg/log" - "github.com/urfave/cli" + "github.com/urfave/cli/v2" ) var recipeDiffCommand = cli.Command{ diff --git a/cli/recipe/fetch.go b/cli/recipe/fetch.go index 102f6fb4..d9da2eed 100644 --- a/cli/recipe/fetch.go +++ b/cli/recipe/fetch.go @@ -6,7 +6,7 @@ import ( "coopcloud.tech/abra/pkg/formatter" "coopcloud.tech/abra/pkg/log" "coopcloud.tech/abra/pkg/recipe" - "github.com/urfave/cli" + "github.com/urfave/cli/v2" ) var recipeFetchCommand = cli.Command{ diff --git a/cli/recipe/lint.go b/cli/recipe/lint.go index 4de8be2d..c7f0bb46 100644 --- a/cli/recipe/lint.go +++ b/cli/recipe/lint.go @@ -8,7 +8,7 @@ import ( "coopcloud.tech/abra/pkg/formatter" "coopcloud.tech/abra/pkg/lint" "coopcloud.tech/abra/pkg/log" - "github.com/urfave/cli" + "github.com/urfave/cli/v2" ) var recipeLintCommand = cli.Command{ diff --git a/cli/recipe/list.go b/cli/recipe/list.go index 8cd13627..60032ae0 100644 --- a/cli/recipe/list.go +++ b/cli/recipe/list.go @@ -10,12 +10,13 @@ import ( "coopcloud.tech/abra/pkg/formatter" "coopcloud.tech/abra/pkg/log" "coopcloud.tech/abra/pkg/recipe" - "github.com/urfave/cli" + "github.com/urfave/cli/v2" ) var pattern string var patternFlag = &cli.StringFlag{ - Name: "pattern, p", + Name: "pattern", + Aliases: []string{"p"}, Value: "", Usage: "Simple string to filter recipes", Destination: &pattern, diff --git a/cli/recipe/new.go b/cli/recipe/new.go index 76f53aed..16e8f6f7 100644 --- a/cli/recipe/new.go +++ b/cli/recipe/new.go @@ -13,7 +13,7 @@ import ( "coopcloud.tech/abra/pkg/git" "coopcloud.tech/abra/pkg/log" "coopcloud.tech/abra/pkg/recipe" - "github.com/urfave/cli" + "github.com/urfave/cli/v2" ) // recipeMetadata is the recipe metadata for the README.md diff --git a/cli/recipe/recipe.go b/cli/recipe/recipe.go index ed61f712..bed88864 100644 --- a/cli/recipe/recipe.go +++ b/cli/recipe/recipe.go @@ -1,7 +1,7 @@ package recipe import ( - "github.com/urfave/cli" + "github.com/urfave/cli/v2" ) // RecipeCommand defines all recipe related sub-commands. @@ -19,16 +19,16 @@ for you. Anyone who uses a recipe can become a maintainer. Maintainers typically make sure the recipe is in good working order and the config upgraded in a timely manner.`, - Subcommands: []cli.Command{ - recipeFetchCommand, - recipeLintCommand, - recipeListCommand, - recipeNewCommand, - recipeReleaseCommand, - recipeSyncCommand, - recipeUpgradeCommand, - recipeVersionCommand, - recipeResetCommand, - recipeDiffCommand, + Subcommands: []*cli.Command{ + &recipeFetchCommand, + &recipeLintCommand, + &recipeListCommand, + &recipeNewCommand, + &recipeReleaseCommand, + &recipeSyncCommand, + &recipeUpgradeCommand, + &recipeVersionCommand, + &recipeResetCommand, + &recipeDiffCommand, }, } diff --git a/cli/recipe/release.go b/cli/recipe/release.go index ad867040..1fdae64c 100644 --- a/cli/recipe/release.go +++ b/cli/recipe/release.go @@ -18,7 +18,7 @@ import ( "github.com/AlecAivazis/survey/v2" "github.com/distribution/reference" "github.com/go-git/go-git/v5" - "github.com/urfave/cli" + "github.com/urfave/cli/v2" ) var recipeReleaseCommand = cli.Command{ diff --git a/cli/recipe/reset.go b/cli/recipe/reset.go index 282fcf66..158be4a0 100644 --- a/cli/recipe/reset.go +++ b/cli/recipe/reset.go @@ -6,7 +6,7 @@ import ( "coopcloud.tech/abra/pkg/log" "coopcloud.tech/abra/pkg/recipe" "github.com/go-git/go-git/v5" - "github.com/urfave/cli" + "github.com/urfave/cli/v2" ) var recipeResetCommand = cli.Command{ diff --git a/cli/recipe/sync.go b/cli/recipe/sync.go index 3ab18492..06f11b73 100644 --- a/cli/recipe/sync.go +++ b/cli/recipe/sync.go @@ -12,7 +12,7 @@ import ( "github.com/AlecAivazis/survey/v2" "github.com/go-git/go-git/v5" "github.com/go-git/go-git/v5/plumbing" - "github.com/urfave/cli" + "github.com/urfave/cli/v2" ) var recipeSyncCommand = cli.Command{ diff --git a/cli/recipe/upgrade.go b/cli/recipe/upgrade.go index 759d3c5c..69c089e7 100644 --- a/cli/recipe/upgrade.go +++ b/cli/recipe/upgrade.go @@ -19,7 +19,7 @@ import ( "coopcloud.tech/tagcmp" "github.com/AlecAivazis/survey/v2" "github.com/distribution/reference" - "github.com/urfave/cli" + "github.com/urfave/cli/v2" ) type imgPin struct { diff --git a/cli/recipe/version.go b/cli/recipe/version.go index a0069bc0..0d3fd052 100644 --- a/cli/recipe/version.go +++ b/cli/recipe/version.go @@ -10,7 +10,7 @@ import ( "coopcloud.tech/abra/pkg/log" recipePkg "coopcloud.tech/abra/pkg/recipe" "github.com/olekukonko/tablewriter" - "github.com/urfave/cli" + "github.com/urfave/cli/v2" ) func sortServiceByName(versions [][]string) func(i, j int) bool { diff --git a/cli/server/add.go b/cli/server/add.go index c5592ffd..c19ab42c 100644 --- a/cli/server/add.go +++ b/cli/server/add.go @@ -13,12 +13,13 @@ import ( "coopcloud.tech/abra/pkg/log" "coopcloud.tech/abra/pkg/server" sshPkg "coopcloud.tech/abra/pkg/ssh" - "github.com/urfave/cli" + "github.com/urfave/cli/v2" ) var local bool var localFlag = &cli.BoolFlag{ - Name: "local, l", + Name: "local", + Aliases: []string{"l"}, Usage: "Use local server", Destination: &local, } @@ -131,7 +132,7 @@ of your ~/.ssh/config. Checks for a valid online domain will be skipped: Before: internal.SubCommandBefore, ArgsUsage: "", Action: func(c *cli.Context) error { - if len(c.Args()) > 0 && local || !internal.ValidateSubCmdFlags(c) { + if c.Args().Len() > 0 && local || !internal.ValidateSubCmdFlags(c) { err := errors.New("cannot use and --local together") internal.ShowSubcommandHelpAndError(c, err) } diff --git a/cli/server/list.go b/cli/server/list.go index 8fea3e0b..f93bfe2f 100644 --- a/cli/server/list.go +++ b/cli/server/list.go @@ -9,7 +9,7 @@ import ( "coopcloud.tech/abra/pkg/formatter" "coopcloud.tech/abra/pkg/log" "github.com/docker/cli/cli/connhelper/ssh" - "github.com/urfave/cli" + "github.com/urfave/cli/v2" ) var serverListCommand = cli.Command{ diff --git a/cli/server/prune.go b/cli/server/prune.go index 54b44ee8..b913ee4b 100644 --- a/cli/server/prune.go +++ b/cli/server/prune.go @@ -9,13 +9,14 @@ import ( "coopcloud.tech/abra/pkg/formatter" "coopcloud.tech/abra/pkg/log" "github.com/docker/docker/api/types/filters" - "github.com/urfave/cli" + "github.com/urfave/cli/v2" ) var allFilter bool var allFilterFlag = &cli.BoolFlag{ - Name: "all, a", + Name: "all", + Aliases: []string{"a"}, Usage: "Remove all unused images not just dangling ones", Destination: &allFilter, } @@ -23,7 +24,8 @@ var allFilterFlag = &cli.BoolFlag{ var volumesFilter bool var volumesFilterFlag = &cli.BoolFlag{ - Name: "volumes, v", + Name: "volumes", + Aliases: []string{"v"}, Usage: "Prune volumes. This will remove app data, Be Careful!", Destination: &volumesFilter, } diff --git a/cli/server/remove.go b/cli/server/remove.go index 8975cdc4..5364e12e 100644 --- a/cli/server/remove.go +++ b/cli/server/remove.go @@ -9,7 +9,7 @@ import ( "coopcloud.tech/abra/pkg/client" "coopcloud.tech/abra/pkg/config" "coopcloud.tech/abra/pkg/log" - "github.com/urfave/cli" + "github.com/urfave/cli/v2" ) var serverRemoveCommand = cli.Command{ diff --git a/cli/server/server.go b/cli/server/server.go index 5d1c36d7..196702dd 100644 --- a/cli/server/server.go +++ b/cli/server/server.go @@ -1,7 +1,7 @@ package server import ( - "github.com/urfave/cli" + "github.com/urfave/cli/v2" ) // ServerCommand defines the `abra server` command and its subcommands @@ -9,10 +9,10 @@ var ServerCommand = cli.Command{ Name: "server", Aliases: []string{"s"}, Usage: "Manage servers", - Subcommands: []cli.Command{ - serverAddCommand, - serverListCommand, - serverRemoveCommand, - serverPruneCommand, + Subcommands: []*cli.Command{ + &serverAddCommand, + &serverListCommand, + &serverRemoveCommand, + &serverPruneCommand, }, } diff --git a/cli/updater/updater.go b/cli/updater/updater.go index ca2b8ff2..6dc25c44 100644 --- a/cli/updater/updater.go +++ b/cli/updater/updater.go @@ -23,21 +23,23 @@ import ( dockerclient "github.com/docker/docker/client" "coopcloud.tech/abra/pkg/log" - "github.com/urfave/cli" + "github.com/urfave/cli/v2" ) const SERVER = "localhost" var majorUpdate bool var majorFlag = &cli.BoolFlag{ - Name: "major, m", + Name: "major", + Aliases: []string{"m"}, Usage: "Also check for major updates", Destination: &majorUpdate, } var updateAll bool var allFlag = &cli.BoolFlag{ - Name: "all, a", + Name: "all", + Aliases: []string{"a"}, Usage: "Update all deployed apps", Destination: &updateAll, } @@ -480,9 +482,9 @@ func newAbraApp(version, commit string) *cli.App { |_| `, Version: fmt.Sprintf("%s-%s", version, commit[:7]), - Commands: []cli.Command{ - Notify, - UpgradeApp, + Commands: []*cli.Command{ + &Notify, + &UpgradeApp, }, } diff --git a/go.mod b/go.mod index 7ff87ad7..ef8eccc7 100644 --- a/go.mod +++ b/go.mod @@ -18,6 +18,7 @@ require ( github.com/olekukonko/tablewriter v0.0.5 github.com/pkg/errors v0.9.1 github.com/schollz/progressbar/v3 v3.14.4 + github.com/urfave/cli/v2 v2.27.2 gopkg.in/yaml.v3 v3.0.1 gotest.tools/v3 v3.5.1 ) @@ -91,6 +92,7 @@ require ( github.com/xanzy/ssh-agent v0.3.3 // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect + github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 // indirect go.opentelemetry.io/otel v1.28.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.28.0 // indirect @@ -134,7 +136,6 @@ require ( github.com/spf13/cobra v1.8.1 // indirect github.com/stretchr/testify v1.9.0 github.com/theupdateframework/notary v0.7.0 // indirect - github.com/urfave/cli v1.22.15 github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect golang.org/x/sys v0.22.0 ) diff --git a/go.sum b/go.sum index 86018965..02690cf8 100644 --- a/go.sum +++ b/go.sum @@ -49,7 +49,6 @@ github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZ github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v1.0.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= -github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/toml v1.4.0 h1:kuoIxZQy2WRRk1pttg9asf+WVv6tWQuBNVmK8+nqPr0= github.com/BurntSushi/toml v1.4.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= @@ -861,9 +860,6 @@ github.com/stretchr/objx v0.0.0-20180129172003-8a3f7159479f/go.mod h1:HFkY916IF+ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v0.0.0-20180303142811-b89eecf5ca5d/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= @@ -871,9 +867,6 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= @@ -893,8 +886,8 @@ github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijb github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli v1.22.4/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/urfave/cli v1.22.15 h1:nuqt+pdC/KqswQKhETJjo7pvn/k4xMUxgW6liI7XpnM= -github.com/urfave/cli v1.22.15/go.mod h1:wSan1hmo5zeyLGBjRJbzRTNk8gwoYa2B9n4q9dmRIc0= +github.com/urfave/cli/v2 v2.27.2 h1:6e0H+AkS+zDckwPCUrZkKX38mRaau4nL2uipkJpbkcI= +github.com/urfave/cli/v2 v2.27.2/go.mod h1:g0+79LmHHATl7DAcHO99smiR/T7uGLw84w8Y42x+4eM= github.com/vbatts/tar-split v0.11.2/go.mod h1:vV3ZuO2yWSVsz+pfFzDG/upWH1JhjOiEaWq6kXyQ3VI= github.com/vishvananda/netlink v0.0.0-20181108222139-023a6dafdcdf/go.mod h1:+SR5DhBJrl6ZM7CoCKvpw5BKroDKQ+PJqOg65H/2ktk= github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= @@ -916,6 +909,8 @@ github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17 github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913 h1:+qGGcbkzsfDQNPPe9UDgpxAWQrhbbBXOYJFQDq/dtJw= +github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913/go.mod h1:4aEEwZQutDLsQv2Deui4iYQ6DWTxR14g6m8Wv88+Xqk= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= diff --git a/pkg/autocomplete/autocomplete.go b/pkg/autocomplete/autocomplete.go index f34eca30..93e57d73 100644 --- a/pkg/autocomplete/autocomplete.go +++ b/pkg/autocomplete/autocomplete.go @@ -6,7 +6,7 @@ import ( "coopcloud.tech/abra/pkg/app" "coopcloud.tech/abra/pkg/log" "coopcloud.tech/abra/pkg/recipe" - "github.com/urfave/cli" + "github.com/urfave/cli/v2" ) // AppNameComplete copletes app names.