exec

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: MIT Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunShell

func RunShell(command string, receiveOutput chan string, environment map[string]string, workingDirectory string, outputCmd bool) int

RunShell 执行shell命令 command:要执行的命令 receiveOutput:输出流 environment:环境变量 workingDirectory:当前工作目录位置 return:exit code

func RunShellCommand added in v0.14.0

func RunShellCommand(command string, environment map[string]string, workingDirectory string, outputCmd bool) (int, []string)

RunShellCommand 执行shell命令 command:要执行的命令 environment:环境变量 workingDirectory:当前工作目录位置 return:exit code

func RunShellContext

func RunShellContext(ctx context.Context, command string, receiveOutput chan string, environment map[string]string, workingDirectory string, outputCmd bool) int

RunShellContext 执行shell命令 command:要执行的命令 receiveOutput:输出流 environment:环境变量 workingDirectory:当前工作目录位置 return:exit code

Types

This section is empty.

Jump to

Keyboard shortcuts

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