execUtil

package
v1.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 11, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecCmd

func ExecCmd(cmdDict map[string]string, iTimeOut int, cmdDir string) error

执行系统命令行命令 参数:cmdDict 系统命令行命令及参数字典

cmdDict["cmd"]:命令行命令
cmdDict["cmdArgs"]:对应命令的参数
iTimeOut:命令执行超时时间,如果为0则表示一直等待至命令运行完毕
cmdDir:命令运行的工作目录

func ExecCmdContext

func ExecCmdContext(cmdDict map[string]string, iTimeOut int, cmdDir string) (cmdOutInfo *bytes.Buffer, cmdErrInfo *bytes.Buffer, err error)

func ExecCmdWithErrInfo

func ExecCmdWithErrInfo(cmdDict map[string]string, iTimeOut int, cmdDir string) ([]string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL