upgrade third party dependencies

This commit is contained in:
MaysWind
2025-04-27 23:22:26 +08:00
parent b7d2653fb5
commit 86c5b882c2
12 changed files with 126 additions and 105 deletions
+23 -4
View File
@@ -1,12 +1,15 @@
package core
import (
"github.com/urfave/cli/v2"
"context"
"github.com/urfave/cli/v3"
)
// CliContext represents the command-line context
type CliContext struct {
*cli.Context
context.Context
command *cli.Command
}
// GetContextId returns the current context id
@@ -19,9 +22,25 @@ func (c *CliContext) GetClientLocale() string {
return ""
}
// Bool returns the boolean value of parameter
func (c *CliContext) Bool(name string) bool {
return c.command.Bool(name)
}
// Int returns the integer value of parameter
func (c *CliContext) Int(name string) int {
return c.command.Int(name)
}
// String returns the string value of parameter
func (c *CliContext) String(name string) string {
return c.command.String(name)
}
// WrapCliContext returns a context wrapped by this file
func WrapCilContext(cliCtx *cli.Context) *CliContext {
func WrapCilContext(ctx context.Context, cmd *cli.Command) *CliContext {
return &CliContext{
Context: cliCtx,
Context: ctx,
command: cmd,
}
}