mirror of
https://gitee.com/energye/energy.git
synced 2024-12-05 05:08:17 +08:00
26 lines
897 B
Go
26 lines
897 B
Go
package cmd
|
|
|
|
type CommandConfig struct {
|
|
Index int
|
|
Wd string
|
|
Install Install `command:"install"`
|
|
Package Package `command:"package"`
|
|
}
|
|
|
|
type Install struct {
|
|
Path string `short:"p" long:"path" description:"Installation directory Default current directory"`
|
|
Version string `short:"v" long:"version" description:"Specifying a version number"`
|
|
Name string `short:"n" long:"name" description:"Name of the frame after installation" default:"EnergyFramework"`
|
|
}
|
|
|
|
type Package struct {
|
|
Path string `short:"p" long:"path" description:"Package directory"`
|
|
Mode string `short:"m" long:"mode" description:"Use mode to set online or offline, offline by default." default:"offline"`
|
|
Out string `short:"o" long:"out" description:"Output directory" default:"EnergyInstallPkg"`
|
|
}
|
|
|
|
type Command struct {
|
|
Run func(c *CommandConfig) error
|
|
UsageLine, Short, Long string
|
|
}
|