Documentation ¶
Index ¶
- Variables
- func ExtractFiles(keyName, sourcePath string, di *downloadInfo, ...)
- func ExtractUnTar(filePath, targetPath string, files ...interface{})
- func ExtractUnZip(filePath, targetPath string, files ...interface{})
- func UnBz2ToTar(name string, callback func(totalLength, processLength int64)) string
- type Command
- type CommandConfig
- type Install
- type Package
- type Version
Constants ¶
This section is empty.
Variables ¶
View Source
var CmdInstall = &Command{
UsageLine: "install -p [path] -v [version] -n [name] -d [download]",
Short: "Automatically configure the CEF and Energy framework",
Long: `
-p Installation directory Default current directory
-v Specifying a version number,Default latest
-n Name of the frame after installation
-d Download Source, gitee or github, Default gitee
. Execute default command
Automatically configure the CEF and Energy framework.
During this process, CEF and Energy are downloaded.
Default framework name is "EnergyFramework".
`,
}
View Source
var CmdPackage = &Command{
UsageLine: "package -p [path] -m [model] -o [out]",
Short: "Making an Installation Package",
Long: `
-p Package directory
-m Use mode to set online or offline, offline by default
-o Output directory
. Execute default command
Making an Installation Package.
Set the package directory by specifying Path. The current directory is the default
Use mode to set online or offline, offline by default.
The framework is automatically downloaded when installed in online mode, installation package will be much smaller.
Offline mode makes the framework into the package,installation package will be large
`,
}
View Source
var CmdVersion = &Command{
UsageLine: "package -a [all]",
Short: "Get version list",
Long: `
-a show all details
. Execute default command
`,
}
Functions ¶
func ExtractFiles ¶
func ExtractFiles(keyName, sourcePath string, di *downloadInfo, extractOSConfig map[string]interface{})
提取文件
func ExtractUnTar ¶
func ExtractUnTar(filePath, targetPath string, files ...interface{})
func ExtractUnZip ¶
func ExtractUnZip(filePath, targetPath string, files ...interface{})
func UnBz2ToTar ¶
释放bz2文件到tar
Types ¶
type Command ¶
type Command struct { Run func(c *CommandConfig) error UsageLine, Short, Long string }
type CommandConfig ¶
type Install ¶
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"` Download string `short:"d" long:"download" description:"Download Source, gitee or github, Default gitee" default:"gitee"` }
type Package ¶
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"` }
Click to show internal directories.
Click to hide internal directories.