mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-14 06:57:35 +08:00
upgrade third party dependencies
This commit is contained in:
+23
-4
@@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user