diff --git a/cmd/cmd.go b/cmd/cmd.go index be876846..87df848d 100644 --- a/cmd/cmd.go +++ b/cmd/cmd.go @@ -17,10 +17,11 @@ package cmd import ( + "context" "fmt" "os" - "github.com/urfave/cli/v2" + "github.com/urfave/cli/v3" "github.com/version-fox/vfox/cmd/commands" "github.com/version-fox/vfox/internal" "github.com/version-fox/vfox/internal/logger" @@ -31,12 +32,12 @@ func Execute(args []string) { } type cmd struct { - app *cli.App + app *cli.Command version string } func (c *cmd) Execute(args []string) { - if err := c.app.Run(args); err != nil { + if err := c.app.Run(context.Background(), args); err != nil { fmt.Println(err) os.Exit(1) } @@ -48,14 +49,14 @@ func newCmd() *cmd { Name: "version", Aliases: []string{"v", "V"}, Usage: "print version", - Action: func(ctx *cli.Context, b bool) error { + Action: func(ctx context.Context, cmd *cli.Command, b bool) error { println(version) return nil }, } - app := &cli.App{} - app.EnableBashCompletion = true + app := &cli.Command{} + app.EnableShellCompletion = true app.Name = "vfox" app.Usage = "vfox is a tool for runtime version management." app.UsageText = "vfox [command] [command options]" @@ -63,16 +64,16 @@ func newCmd() *cmd { app.Version = version app.Description = "vfox is a cross-platform version manager, extendable via plugins. It allows you to quickly install and switch between different environment you need via the command line." app.Suggest = true - app.BashComplete = func(ctx *cli.Context) { - for _, command := range ctx.App.Commands { - _, _ = fmt.Fprintln(ctx.App.Writer, command.Name) + app.ShellComplete = func(ctx context.Context, cmd *cli.Command) { + for _, command := range cmd.Commands { + _, _ = fmt.Fprintln(cmd.Writer, command.Name) } } debugFlags := &cli.BoolFlag{ Name: "debug", Usage: "show debug information", - Action: func(ctx *cli.Context, b bool) error { + Action: func(ctx context.Context, cmd *cli.Command, b bool) error { logger.SetLevel(logger.DebugLevel) return nil }, diff --git a/cmd/commands/activate.go b/cmd/commands/activate.go index 746f20ab..f3886ddf 100644 --- a/cmd/commands/activate.go +++ b/cmd/commands/activate.go @@ -17,6 +17,7 @@ package commands import ( + "context" "fmt" "os" "strings" @@ -24,7 +25,7 @@ import ( "github.com/version-fox/vfox/internal" - "github.com/urfave/cli/v2" + "github.com/urfave/cli/v3" "github.com/version-fox/vfox/internal/env" "github.com/version-fox/vfox/internal/shell" ) @@ -36,8 +37,8 @@ var Activate = &cli.Command{ Category: CategorySDK, } -func activateCmd(ctx *cli.Context) error { - name := ctx.Args().First() +func activateCmd(ctx context.Context, cmd *cli.Command) error { + name := cmd.Args().First() if name == "" { return cli.Exit("shell name is required", 1) } @@ -70,7 +71,7 @@ func activateCmd(ctx *cli.Context) error { str, err := s.Activate( shell.ActivateConfig{ SelfPath: path, - Args: ctx.Args().Tail(), + Args: cmd.Args().Tail(), }, ) if err != nil { @@ -87,5 +88,5 @@ func activateCmd(ctx *cli.Context) error { SelfPath: path, EnvContent: exportStr, } - return hookTemplate.Execute(ctx.App.Writer, tmpCtx) + return hookTemplate.Execute(cmd.Writer, tmpCtx) } diff --git a/cmd/commands/add.go b/cmd/commands/add.go index 64a30802..ed911ee0 100644 --- a/cmd/commands/add.go +++ b/cmd/commands/add.go @@ -17,10 +17,11 @@ package commands import ( +"context" "fmt" "github.com/pterm/pterm" - "github.com/urfave/cli/v2" + "github.com/urfave/cli/v3" "github.com/version-fox/vfox/internal" ) @@ -43,8 +44,8 @@ var Add = &cli.Command{ } // addCmd is the command to add a plugin of sdk -func addCmd(ctx *cli.Context) error { - args := ctx.Args() +func addCmd(ctx context.Context, cmd *cli.Command) error { + args := cmd.Args() manager := internal.NewSdkManager() defer manager.Close() @@ -60,8 +61,8 @@ func addCmd(ctx *cli.Context) error { return nil } else { sdkName := args.First() - source := ctx.String("source") - alias := ctx.String("alias") + source := cmd.String("source") + alias := cmd.String("alias") err := manager.Add(sdkName, source, alias) if err == nil { pterm.Printf("Please use `%s` to install the version you need.\n", pterm.LightBlue(fmt.Sprintf("vfox install %s@", sdkName))) diff --git a/cmd/commands/available.go b/cmd/commands/available.go index ccf38823..14e199aa 100644 --- a/cmd/commands/available.go +++ b/cmd/commands/available.go @@ -17,10 +17,11 @@ package commands import ( + "context" "strings" "github.com/pterm/pterm" - "github.com/urfave/cli/v2" + "github.com/urfave/cli/v3" "github.com/version-fox/vfox/internal" ) @@ -31,10 +32,10 @@ var Available = &cli.Command{ Category: CategoryPlugin, } -func availableCmd(ctx *cli.Context) error { +func availableCmd(ctx context.Context, cmd *cli.Command) error { manager := internal.NewSdkManager() defer manager.Close() - //categoryName := ctx.Args().First() + //categoryName := cmd.Args().First() available, err := manager.Available() if err != nil { return err diff --git a/cmd/commands/cd.go b/cmd/commands/cd.go index 89ad727a..4b54e2e2 100644 --- a/cmd/commands/cd.go +++ b/cmd/commands/cd.go @@ -1,10 +1,11 @@ package commands import ( + "context" "fmt" "os" - "github.com/urfave/cli/v2" + "github.com/urfave/cli/v3" "github.com/version-fox/vfox/internal" "github.com/version-fox/vfox/internal/env" "github.com/version-fox/vfox/internal/shell" @@ -23,19 +24,19 @@ var Cd = &cli.Command{ Action: cdCmd, } -func cdCmd(ctx *cli.Context) error { +func cdCmd(ctx context.Context, cmd *cli.Command) error { var dir string manager := internal.NewSdkManager() - if ctx.Args().Len() == 0 { + if cmd.Args().Len() == 0 { dir = manager.PathMeta.HomePath } else { - sdkName := ctx.Args().First() + sdkName := cmd.Args().First() sdk, err := manager.LookupSdk(sdkName) if err != nil { return err } - if ctx.Bool("plugin") { + if cmd.Bool("plugin") { dir = sdk.Plugin.Path } else { current := sdk.Current() diff --git a/cmd/commands/config.go b/cmd/commands/config.go index 5ec82607..68fbafb5 100644 --- a/cmd/commands/config.go +++ b/cmd/commands/config.go @@ -1,6 +1,7 @@ package commands import ( + "context" "errors" "fmt" "github.com/version-fox/vfox/internal/config" @@ -9,7 +10,7 @@ import ( "strings" "time" - "github.com/urfave/cli/v2" + "github.com/urfave/cli/v3" "github.com/version-fox/vfox/internal" ) @@ -31,23 +32,23 @@ var Config = &cli.Command{ Action: configCmd, } -func configCmd(ctx *cli.Context) error { +func configCmd(ctx context.Context, cmd *cli.Command) error { manager := internal.NewSdkManager() defer manager.Close() conf := reflect.ValueOf(manager.Config) - if ctx.Bool("list") { + if cmd.Bool("list") { configList("", conf) return nil } - args := ctx.Args() + args := cmd.Args() if args.Len() == 0 { - return ctx.App.Run([]string{"CMD", "config", "-h"}) + return cmd.Run(ctx, []string{"CMD", "config", "-h"}) } keys := strings.Split(args.First(), ".") - unset := ctx.Bool("unset") + unset := cmd.Bool("unset") if !unset && args.Len() == 1 { configGet(conf, keys) return nil diff --git a/cmd/commands/current.go b/cmd/commands/current.go index 0bb33489..4cd719c0 100644 --- a/cmd/commands/current.go +++ b/cmd/commands/current.go @@ -17,10 +17,11 @@ package commands import ( + "context" "fmt" "github.com/pterm/pterm" - "github.com/urfave/cli/v2" + "github.com/urfave/cli/v3" "github.com/version-fox/vfox/internal" ) @@ -33,10 +34,10 @@ var Current = &cli.Command{ Category: CategorySDK, } -func currentCmd(ctx *cli.Context) error { +func currentCmd(ctx context.Context, cmd *cli.Command) error { manager := internal.NewSdkManager() defer manager.Close() - sdkName := ctx.Args().First() + sdkName := cmd.Args().First() if sdkName == "" { allSdk, err := manager.LoadAllSdk() if err != nil { diff --git a/cmd/commands/env.go b/cmd/commands/env.go index d59a17ce..d89a5f54 100644 --- a/cmd/commands/env.go +++ b/cmd/commands/env.go @@ -17,10 +17,11 @@ package commands import ( + "context" "encoding/json" "fmt" - "github.com/urfave/cli/v2" + "github.com/urfave/cli/v3" "github.com/version-fox/vfox/internal" "github.com/version-fox/vfox/internal/base" "github.com/version-fox/vfox/internal/env" @@ -55,15 +56,15 @@ var Env = &cli.Command{ Category: CategorySDK, } -func envCmd(ctx *cli.Context) error { - if ctx.IsSet("json") { +func envCmd(ctx context.Context, cmd *cli.Command) error { + if cmd.IsSet("json") { return outputJSON() - } else if ctx.IsSet("cleanup") { + } else if cmd.IsSet("cleanup") { return cleanTmp() - } else if ctx.IsSet("full") { - return envFlag(ctx, "full") + } else if cmd.IsSet("full") { + return envFlag(cmd, "full") } else { - return envFlag(ctx, "cwd") + return envFlag(cmd, "cwd") } } @@ -114,8 +115,8 @@ func cleanTmp() error { return nil } -func envFlag(ctx *cli.Context, mode string) error { - shellName := ctx.String("shell") +func envFlag(cmd *cli.Command, mode string) error { + shellName := cmd.String("shell") if shellName == "" { return cli.Exit("shell name is required", 1) } diff --git a/cmd/commands/info.go b/cmd/commands/info.go index 5bf6de7a..cef9e25f 100644 --- a/cmd/commands/info.go +++ b/cmd/commands/info.go @@ -17,13 +17,14 @@ package commands import ( + "context" "fmt" "path/filepath" "strings" "text/template" "github.com/pterm/pterm" - "github.com/urfave/cli/v2" + "github.com/urfave/cli/v3" "github.com/version-fox/vfox/internal" "github.com/version-fox/vfox/internal/base" ) @@ -43,10 +44,10 @@ var Info = &cli.Command{ }, } -func infoCmd(ctx *cli.Context) error { +func infoCmd(ctx context.Context, cmd *cli.Command) error { manager := internal.NewSdkManager() defer manager.Close() - args := ctx.Args().First() + args := cmd.Args().First() if args == "" { return cli.Exit("invalid arguments", 1) } @@ -62,7 +63,7 @@ func infoCmd(ctx *cli.Context) error { if name != "" && string(version) != "" { sdk, err := manager.LookupSdk(name) if err != nil { - if ctx.IsSet("format") { + if cmd.IsSet("format") { // For template output, we still need to output something data := struct { Name string @@ -73,7 +74,7 @@ func infoCmd(ctx *cli.Context) error { Version: string(version), Path: "notfound", } - return executeTemplate(ctx, data) + return executeTemplate(cmd, data) } fmt.Println("notfound") return nil @@ -87,7 +88,7 @@ func infoCmd(ctx *cli.Context) error { } // Check if format flag is set - formatValue := ctx.String("format") + formatValue := cmd.String("format") if formatValue != "" { data := struct { Name string @@ -98,7 +99,7 @@ func infoCmd(ctx *cli.Context) error { Version: string(version), Path: path, } - return executeTemplate(ctx, data) + return executeTemplate(cmd, data) } fmt.Println(path) @@ -115,7 +116,7 @@ func infoCmd(ctx *cli.Context) error { source := s.Plugin // If format flag is set, prepare data for template - if ctx.IsSet("format") { + if cmd.IsSet("format") { data := struct { Name string Version string @@ -129,7 +130,7 @@ func infoCmd(ctx *cli.Context) error { InstallPath: s.InstallPath, Description: source.Description, } - return executeTemplate(ctx, data) + return executeTemplate(cmd, data) } pterm.Println("Plugin Info:") @@ -142,11 +143,11 @@ func infoCmd(ctx *cli.Context) error { return nil } -func executeTemplate(ctx *cli.Context, data interface{}) error { - tmplStr := ctx.String("format") +func executeTemplate(cmd *cli.Command, data interface{}) error { + tmplStr := cmd.String("format") tmpl, err := template.New("format").Parse(tmplStr) if err != nil { return fmt.Errorf("error parsing template: %w", err) } - return tmpl.Execute(ctx.App.Writer, data) + return tmpl.Execute(cmd.Writer, data) } diff --git a/cmd/commands/install.go b/cmd/commands/install.go index 2fff7f30..89504d02 100644 --- a/cmd/commands/install.go +++ b/cmd/commands/install.go @@ -17,13 +17,14 @@ package commands import ( + "context" "errors" "fmt" "os" "strings" "github.com/pterm/pterm" - "github.com/urfave/cli/v2" + "github.com/urfave/cli/v3" "github.com/version-fox/vfox/internal" "github.com/version-fox/vfox/internal/base" "github.com/version-fox/vfox/internal/logger" @@ -51,14 +52,14 @@ var Install = &cli.Command{ Category: CategorySDK, } -func installCmd(ctx *cli.Context) error { - yes := ctx.Bool("yes") +func installCmd(ctx context.Context, cmd *cli.Command) error { + yes := cmd.Bool("yes") - if ctx.Bool("all") { + if cmd.Bool("all") { return installAll(yes) } - args := ctx.Args() + args := cmd.Args() if args.First() == "" { return cli.Exit("sdk name is required", 1) } diff --git a/cmd/commands/list.go b/cmd/commands/list.go index 976f8c5e..80e6ccf6 100644 --- a/cmd/commands/list.go +++ b/cmd/commands/list.go @@ -17,11 +17,12 @@ package commands import ( + "context" "fmt" "github.com/pterm/pterm" "github.com/pterm/pterm/putils" - "github.com/urfave/cli/v2" + "github.com/urfave/cli/v3" "github.com/version-fox/vfox/internal" ) @@ -33,10 +34,10 @@ var List = &cli.Command{ Category: CategorySDK, } -func listCmd(ctx *cli.Context) error { +func listCmd(ctx context.Context, cmd *cli.Command) error { manager := internal.NewSdkManager() defer manager.Close() - sdkName := ctx.Args().First() + sdkName := cmd.Args().First() if sdkName == "" { allSdk, err := manager.LoadAllSdk() if err != nil { diff --git a/cmd/commands/remove.go b/cmd/commands/remove.go index 41e5290c..ebb96ae2 100644 --- a/cmd/commands/remove.go +++ b/cmd/commands/remove.go @@ -17,8 +17,9 @@ package commands import ( + "context" "github.com/pterm/pterm" - "github.com/urfave/cli/v2" + "github.com/urfave/cli/v3" "github.com/version-fox/vfox/internal" ) @@ -29,8 +30,8 @@ var Remove = &cli.Command{ Category: CategoryPlugin, } -func removeCmd(ctx *cli.Context) error { - args := ctx.Args() +func removeCmd(ctx context.Context, cmd *cli.Command) error { + args := cmd.Args() l := args.Len() if l < 1 { return cli.Exit("invalid arguments", 1) diff --git a/cmd/commands/search.go b/cmd/commands/search.go index 9a62f3d8..c8d90093 100644 --- a/cmd/commands/search.go +++ b/cmd/commands/search.go @@ -17,12 +17,13 @@ package commands import ( + "context" "fmt" "math" "os" "strings" - "github.com/urfave/cli/v2" + "github.com/urfave/cli/v3" "github.com/version-fox/vfox/internal" "github.com/version-fox/vfox/internal/base" "github.com/version-fox/vfox/internal/printer" @@ -110,10 +111,10 @@ func RunSearch(sdkName string, availableArgs []string) error { return source.Install(base.Version(version.Key)) } -func searchCmd(ctx *cli.Context) error { - sdkName := ctx.Args().First() +func searchCmd(ctx context.Context, cmd *cli.Command) error { + sdkName := cmd.Args().First() if sdkName == "" { return cli.Exit("sdk name is required", 1) } - return RunSearch(sdkName, ctx.Args().Tail()) + return RunSearch(sdkName, cmd.Args().Tail()) } diff --git a/cmd/commands/uninstall.go b/cmd/commands/uninstall.go index 896d3288..501d026e 100644 --- a/cmd/commands/uninstall.go +++ b/cmd/commands/uninstall.go @@ -17,12 +17,13 @@ package commands import ( + "context" "fmt" "os" "strings" "github.com/pterm/pterm" - "github.com/urfave/cli/v2" + "github.com/urfave/cli/v3" "github.com/version-fox/vfox/internal" "github.com/version-fox/vfox/internal/base" ) @@ -35,8 +36,8 @@ var Uninstall = &cli.Command{ Category: CategorySDK, } -func uninstallCmd(ctx *cli.Context) error { - sdkArg := ctx.Args().First() +func uninstallCmd(ctx context.Context, cmd *cli.Command) error { + sdkArg := cmd.Args().First() if sdkArg == "" { return cli.Exit("sdk name is required", 1) } diff --git a/cmd/commands/unuse.go b/cmd/commands/unuse.go index fc91b9b5..f16db6c0 100644 --- a/cmd/commands/unuse.go +++ b/cmd/commands/unuse.go @@ -17,9 +17,10 @@ package commands import ( + "context" "fmt" - "github.com/urfave/cli/v2" + "github.com/urfave/cli/v3" "github.com/version-fox/vfox/internal" "github.com/version-fox/vfox/internal/base" ) @@ -48,16 +49,16 @@ var Unuse = &cli.Command{ Category: CategorySDK, } -func unuseCmd(ctx *cli.Context) error { - sdkName := ctx.Args().First() +func unuseCmd(ctx context.Context, cmd *cli.Command) error { + sdkName := cmd.Args().First() if len(sdkName) == 0 { return fmt.Errorf("invalid parameter. format: ") } scope := base.Session - if ctx.IsSet("global") { + if cmd.IsSet("global") { scope = base.Global - } else if ctx.IsSet("project") { + } else if cmd.IsSet("project") { scope = base.Project } else { scope = base.Session diff --git a/cmd/commands/update.go b/cmd/commands/update.go index 82ba6755..fb77d540 100644 --- a/cmd/commands/update.go +++ b/cmd/commands/update.go @@ -17,10 +17,11 @@ package commands import ( + "context" "fmt" "github.com/pterm/pterm" - "github.com/urfave/cli/v2" + "github.com/urfave/cli/v3" "github.com/version-fox/vfox/internal" ) @@ -40,10 +41,10 @@ var Update = &cli.Command{ Category: CategoryPlugin, } -func updateCmd(ctx *cli.Context) error { +func updateCmd(ctx context.Context, cmd *cli.Command) error { manager := internal.NewSdkManager() defer manager.Close() - if ctx.Bool(allFlag) { + if cmd.Bool(allFlag) { if sdks, err := manager.LoadAllSdk(); err == nil { var ( index int @@ -61,7 +62,7 @@ func updateCmd(ctx *cli.Context) error { return cli.Exit(err.Error(), 1) } } else { - args := ctx.Args() + args := cmd.Args() l := args.Len() if l < 1 { return cli.Exit("invalid arguments", 1) diff --git a/cmd/commands/upgrade.go b/cmd/commands/upgrade.go index 7d6361ab..eb2aab8a 100644 --- a/cmd/commands/upgrade.go +++ b/cmd/commands/upgrade.go @@ -17,6 +17,7 @@ package commands import ( + "context" "fmt" "io" "net/http" @@ -27,7 +28,7 @@ import ( "runtime" "strings" - "github.com/urfave/cli/v2" + "github.com/urfave/cli/v3" "github.com/version-fox/vfox/internal" "github.com/version-fox/vfox/internal/util" ) @@ -110,12 +111,12 @@ func downloadFile(c *http.Client, filepath string, url string) error { return err } -func upgradeCmd(ctx *cli.Context) error { +func upgradeCmd(ctx context.Context, cmd *cli.Command) error { manager := internal.NewSdkManager() defer manager.Close() httpClient := manager.HttpClient() - currVersion := fmt.Sprintf("v%s", ctx.App.Version) + currVersion := fmt.Sprintf("v%s", cmd.Version) latestVersion, err := fetchLatestVersion(httpClient) if err != nil { return cli.Exit("Failed to fetch the latest version: "+err.Error(), 1) diff --git a/cmd/commands/use.go b/cmd/commands/use.go index e4290b91..e628010f 100644 --- a/cmd/commands/use.go +++ b/cmd/commands/use.go @@ -17,6 +17,7 @@ package commands import ( + "context" "fmt" "os" "strings" @@ -25,7 +26,7 @@ import ( "github.com/version-fox/vfox/internal" "github.com/version-fox/vfox/internal/base" - "github.com/urfave/cli/v2" + "github.com/urfave/cli/v3" ) var Use = &cli.Command{ @@ -53,8 +54,8 @@ var Use = &cli.Command{ Category: CategorySDK, } -func useCmd(ctx *cli.Context) error { - sdkArg := ctx.Args().First() +func useCmd(ctx context.Context, cmd *cli.Command) error { + sdkArg := cmd.Args().First() if len(sdkArg) == 0 { return fmt.Errorf("invalid parameter. format: [@]") } @@ -72,9 +73,9 @@ func useCmd(ctx *cli.Context) error { } scope := base.Session - if ctx.IsSet("global") { + if cmd.IsSet("global") { scope = base.Global - } else if ctx.IsSet("project") { + } else if cmd.IsSet("project") { scope = base.Project } else { scope = base.Session diff --git a/go.mod b/go.mod index cb9c0c9b..e0d604a8 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( github.com/schollz/progressbar/v3 v3.14.2 github.com/shirou/gopsutil/v4 v4.25.3 github.com/ulikunitz/xz v0.5.12 - github.com/urfave/cli/v2 v2.27.1 + github.com/urfave/cli/v3 v3.4.1 github.com/yuin/gopher-lua v1.1.1 golang.org/x/crypto v0.35.0 golang.org/x/sys v0.30.0 @@ -26,7 +26,6 @@ require ( github.com/bodgit/plumbing v1.3.0 // indirect github.com/bodgit/windows v1.0.1 // indirect github.com/containerd/console v1.0.4 // indirect - github.com/cpuguy83/go-md2man/v2 v2.0.6 // indirect github.com/ebitengine/purego v0.8.3 // indirect github.com/go-ole/go-ole v1.2.6 // indirect github.com/gookit/color v1.5.4 // indirect @@ -40,11 +39,9 @@ require ( github.com/pierrec/lz4/v4 v4.1.21 // indirect github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect github.com/rivo/uniseg v0.4.7 // indirect - github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect - github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect go4.org v0.0.0-20200411211856-f5505b9728dd // indirect golang.org/x/net v0.29.0 // indirect diff --git a/go.sum b/go.sum index 562d7526..fb710ea8 100644 --- a/go.sum +++ b/go.sum @@ -55,8 +55,6 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U= github.com/containerd/console v1.0.4 h1:F2g4+oChYvBTsASRTz8NP6iIAi97J3TtSAsLbIFn4ro= github.com/containerd/console v1.0.4/go.mod h1:YynlIjWYF8myEu6sdkwKIvGQq+cOckRm6So2avqoYAk= -github.com/cpuguy83/go-md2man/v2 v2.0.6 h1:XJtiaUW6dEEqVuZiMTn1ldk455QWwEIsMIJlo5vtkx0= -github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -155,8 +153,6 @@ github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJ github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= -github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd/go.mod h1:hPqNNc0+uJM6H+SuU8sEs5K5IQeKccPqeSjfgcKGgPk= github.com/schollz/progressbar/v3 v3.14.2 h1:EducH6uNLIWsr560zSV1KrTeUb/wZGAHqyMFIEa99ks= github.com/schollz/progressbar/v3 v3.14.2/go.mod h1:aQAZQnhF4JGFtRJiw/eobaXpsqpVQAftEQ+hLGXaRc4= @@ -182,13 +178,11 @@ github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+F github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= github.com/ulikunitz/xz v0.5.12 h1:37Nm15o69RwBkXM0J6A5OlE67RZTfzUxTj8fB3dfcsc= github.com/ulikunitz/xz v0.5.12/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= -github.com/urfave/cli/v2 v2.27.1 h1:8xSQ6szndafKVRmfyeUMxkNUJQMjL1F2zmsZ+qHpfho= -github.com/urfave/cli/v2 v2.27.1/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ= +github.com/urfave/cli/v3 v3.4.1 h1:1M9UOCy5bLmGnuu1yn3t3CB4rG79Rtoxuv1sPhnm6qM= +github.com/urfave/cli/v3 v3.4.1/go.mod h1:FJSKtM/9AiiTOJL4fJ6TbMUkxBXn7GO9guZqoZtpYpo= github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778/go.mod h1:2MuV+tbUrU1zIOPMxZ5EncGwgmMJsa+9ucAQZXxsObs= github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e h1:JVG44RsyaB9T2KIHavMF/ppJZNG9ZpyihvCd0w101no= github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e/go.mod h1:RbqR21r5mrJuqunuUZ/Dhy/avygyECGrLceyNeo4LiM= -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.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yuin/gopher-lua v1.1.1 h1:kYKnWBjvbNP4XLT3+bPEwAXJx262OhaHDWDVOPjL46M= github.com/yuin/gopher-lua v1.1.1/go.mod h1:GBR0iDaNXjAgGg9zfCvksxSRnQx76gclCIb7kdAd1Pw= diff --git a/internal/manager.go b/internal/manager.go index 2bbdfc04..872fa625 100644 --- a/internal/manager.go +++ b/internal/manager.go @@ -33,7 +33,7 @@ import ( "github.com/pterm/pterm" "github.com/shirou/gopsutil/v4/process" - "github.com/urfave/cli/v2" + "github.com/urfave/cli/v3" "github.com/version-fox/vfox/internal/base" "github.com/version-fox/vfox/internal/cache" "github.com/version-fox/vfox/internal/config"