exec

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CancelPrintInfo

func CancelPrintInfo()

func Cmd

func Cmd(name, dir string, args ...string) (err error)

func CmdShell

func CmdShell(cmd string) error

cmd转换为shell脚本执行,解决不支持linux管道操作问题

func CmdString

func CmdString(cmd string) (err error)

仅支持linux管道符"|"

func CmdStringResult

func CmdStringResult(cmd string) (string, error)

仅支持linux管道符"|"

func ExistsCmd

func ExistsCmd(name string) bool

判断命令是否存在

func NewCmd

func NewCmd(name, dir string, args ...string) *exec.Cmd

func PrintInfo

func PrintInfo()

func SetErrFile

func SetErrFile(file string) error

func SetLogFile

func SetLogFile(file string) error

func Shell

func Shell(file, dir string, args ...string) error

执行shell脚本

func UseLogFileAsErrFile

func UseLogFileAsErrFile()

Types

type Config

type Config struct {
	LogFile, ErrFile               *os.File
	UseLogFileAsErrFile, PrintInfo bool
}

type ExecCmd

type ExecCmd exec.Cmd

Jump to

Keyboard shortcuts

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