mirror of
https://github.com/acepanel/panel.git
synced 2026-02-04 16:10:59 +08:00
24 lines
272 B
Go
24 lines
272 B
Go
package app
|
|
|
|
import (
|
|
"context"
|
|
"os"
|
|
|
|
"github.com/urfave/cli/v3"
|
|
)
|
|
|
|
type Cli struct {
|
|
cmd *cli.Command
|
|
}
|
|
|
|
func NewCli(cmd *cli.Command) *Cli {
|
|
IsCli = true
|
|
return &Cli{
|
|
cmd: cmd,
|
|
}
|
|
}
|
|
|
|
func (r *Cli) Run() error {
|
|
return r.cmd.Run(context.Background(), os.Args)
|
|
}
|