1 Star 0 Fork 0

蒙蒙的男孩/eosc

Create your Gitee Account
Explore and code with more than 13.5 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
app.go 973 Bytes
Copy Edit Raw Blame History
蒙蒙的男孩 authored 2024-01-10 13:49 +08:00 . 重定义项目地址
package eoscli
import (
"fmt"
"gitee.com/meng_mengs_boys/eosc/env"
"github.com/urfave/cli/v2"
)
type App struct {
app *cli.App
}
func NewApp() *App {
return &App{app: &cli.App{
Name: env.AppName(),
Usage: fmt.Sprintf("%s controller", env.AppName()),
Commands: make([]*cli.Command, 0, 6),
Flags: []cli.Flag{
&cli.StringFlag{
Name: "env",
Aliases: nil,
Usage: "",
EnvVars: nil,
FilePath: "",
Required: false,
Hidden: false,
TakesFile: false,
Value: "",
DefaultText: "",
Destination: nil,
HasBeenSet: false,
},
},
}}
}
func (a *App) AppendCommand(cmd ...*cli.Command) {
a.app.Commands = append(a.app.Commands, cmd...)
}
func (a *App) Run(args []string) error {
return a.app.Run(args)
}
func (a *App) Default() {
a.AppendCommand(
Start(),
Join(),
Stop(),
Info(),
Leave(),
Restart(),
//Env(),
Master(),
Remove(),
//Plugin(),
)
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/meng_mengs_boys/eosc.git
git@gitee.com:meng_mengs_boys/eosc.git
meng_mengs_boys
eosc
eosc
v1.15.7

Search