2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 11:27:17 +08:00
Files
panel/internal/app/cli.go
2024-12-15 23:01:17 +08:00

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)
}