Documentation
¶
Index ¶
- func CheckCommand(exe string) bool
- func CheckFileSHA256(filepath string) (string, error)
- func ErrorExitAndDelay(delay int)
- func ExecuteByTerminal(args ...string) error
- func FileExists(filePath string) bool
- func GetSystemTerminal() (string, error)
- func MkdirIfNotExists(folder string) error
- func MoveFile(origin, destination string) error
- func RemoveArgs(origin []string, remove ...string) []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorExitAndDelay ¶
func ErrorExitAndDelay(delay int)
ErrorExitAndDelay 在程序出现严重错误时,延迟几秒并退出 请注意,该函数将导致程序以状态码1退出
- delay 退出之前延迟时间,单位s
func ExecuteByTerminal ¶
ExecuteByTerminal 调用系统默认终端执行一行命令 通过这种方式可以实现弹出终端执行对应命令,使命令的执行过程能够显现
- args 运行的命令行
出现错误则返回错误对象
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.