cmder

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCMDTimeout = errors.New("command execution timed out")

Functions

func CheckBadCmd added in v0.4.0

func CheckBadCmd(s string) bool

CheckBadCmd 检查命令是否包含潜在非法字符

func RunCmd

func RunCmd(cmdArgs []string, timeout ...time.Duration) cmd.Status

RunCmd 运行命令, 返回结果和状态

func RunCmdCombinedOutput added in v0.5.3

func RunCmdCombinedOutput(cmdArgs []string, timeout ...time.Duration) cmd.Status

RunCmdCombinedOutput 运行命令, 合并输出和错误 2>&1

func RunCmdWithContext

func RunCmdWithContext(ctx context.Context, cmdArgs []string) cmd.Status

RunCmdWithContext 运行命令, 返回结果和状态

func RunCmdWithOptions added in v0.5.3

func RunCmdWithOptions(cmdArgs []string, opts cmd.Options, timeout ...time.Duration) cmd.Status

Types

This section is empty.

Jump to

Keyboard shortcuts

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